Routing device for connecting multiple physically discrete networks into a single system and startup method thereof

ABSTRACT

One routing device which connects plural networks on which a plurality of other routing devices, including a parent router, are connected. The parent router manages network identification data to identify the plural networks. Master router data is included for each corresponding other routing device. Master router data includes master router identification data identifying whether the corresponding other routing device is a “master router” located on a path to the parent router or a “slave router” which is a routing device other than the master router, and includes network identification data identifying a network to which the corresponding other routing device connects. Upon startup of the one routing device, the master router data is acquired from the other routing devices on the networks to which the one routing device connects. It is determined whether a router function of the one routing device is enabled based on the acquired master router data.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to a routing device forconnecting multiple physically discrete networks into a single system.

2. Description of the Related Art

Recently various home networks connecting multiple electronic devicesover a network have been introduced. The devices connected to these homenetworks are generally low-cost home appliances for which highreliability operation is required. The devices connected to such homenetworks enable the network to be used for a variety of applications,including security systems and remote control systems.

FIG. 1 is a schematic diagram of a typical home network. As shown inFIG. 1 a refrigerator 1, a washing machine 2, an air conditioner 3, atelevision 4, a controller 11, and so on are connected to a powerlinecommunication network 15. A microwave 5, a bath (hot water heater) 6, agas range 7, and so on are connected to a wireless communication network16. A sleep sensor 8, an entry sensor 9, a telephone 10 and so on areconnected to a dedicated line 14. The powerline communication network 15and the dedicated line 14 are connected to a router 12, and thepowerline communication network 15 and the wireless communicationnetwork 16 are connected to a router 13. These network connectionscomplete the in-home network.

Other devices that might also be connected to this network includelighting fixtures and other home appliances. Infrared and othertransmission media could also be used in addition to or instead ofelectrical power lines, wireless transmission, and dedicated lines.Multiple controllers for specific services could also be used instead ofusing a single controller as shown in FIG. 1.

FIG. 2 is a system diagram showing the conceptual arrangement of devicesand routers connected to this home network. As shown in FIG. 2 a subnetA 21 is connected to a subnet B 22 through a router 31 and to a subnet C23 through a router 32. Network devices 21 a to 23 d are connected tosubnets 21 to 23. The routers 31 and 32 could be any device thatfunctions as a router. Various standards and concepts have been proposedfor effectively running and using such networks. These include, forexample, ET-2010 and ECHONET Specification Ver.1.00, proposed by theElectronic Industries Association of Japan (EIAJ) and the ECHONETConsortium.

Assume, for example, that the router 31 shown in FIG. 2 is operating andnetwork device 21 a functions as a router (“parent router” below) thatassigns “Net ID” as a subnet identifier. If a new router 32 is thenadded to the system, the router 32 must first start up as a networkdevice 21 c and 23 d recognizable by subnet 21 and subnet 23,respectively, and must then query subnet 21 and subnet 23 to determineif a router already exists on the respective subnets. If a router isfound on each subnet, the router 32 starts up as a network device ofboth subnets without activating its functionality as a router.

If on at least one (21) of the plural subnets (21 and 23) there is arouter (31) and on at least one (23) of the subnets there is no router,the router 32 queries the detected router to acquire data about theparent router (i.e. network device 21 a in this example). The router 32then requests the parent router (network device 21 a) for theinformation required for the router 32 to function (i.e., a routeridentifier and Net ID for the new subnet added to the system), and basedon this router information obtained from the parent router (networkdevice 21 a) passes the Net ID to all network devices 23 a to 23 c onthe subnet 23 to which a new Net ID was allocated.

The Net IDs uniquely allocated as subnet identifiers and the node IDnumbers allocated as identifiers uniquely identifying each device on aparticular subnet enable each device to be uniquely addressed within theoverall system formed by linking plural subnets via routers.

Conventional network methods and routers function adequately when therouters start up in the same order previously used. Problems such asthose described below occur, however, if Net IDs are already assigned tothe subnets by the router (that is, the same Net ID is allocated to allnetwork devices connected to a particular subnet), since all networkdevices on the subnet use the assigned Net ID to exchange data withother devices in the domain, if, for example, the power supply suddenlyshuts down due to a power outage, then a system-wide reset occurs.

If the subnet identifiers (i.e., Net IDs) are assigned in the sequencethat the routers start up in a system having three or more subnets, asubnet identifier (Net ID), that is different from the subnet identifierassigned before the reset, could be assigned when the system resetsdepending upon the startup sequence of the routers. If in the networkconfiguration shown in FIG. 2, for example, the router 31 starts upfirst and is therefore assigned a Net ID identifying subnet B, therouter 32 then starts up and is assigned a Net ID identifying subnet C,when due to a power failure the system restarts and the router 32 startsup first and the router 31 then restarts, the router 32 will be set assubnet B and router 31 will be set as subnet C. In other words, Net IDsassigned to the routers may change when the system resets due to thepower outage.

Furthermore, if only one of the routers in the system resets or isreplaced and there is another router on any of the subnets to which thereset or replaced router belongs, the reset or replaced router willstart up simply as a network device other than the router on the subnetsand its router function will not restart.

This can result in excessive time being required for the overall systemto restart when a short-term power outage occurs on a home network, andthe controllers and user could be confused by device identifiers thatdiffer before and after the power outage, thus necessitating a servicecall by a trained technician.

Replacing a router is also not a simple task. The user (i.e., a typicalhomeowner) must acquire the subnet data for the subnet(s) formed by therouter connection before replacing the router by, for example,connecting a display to the router to display the information, and mustthen reset the same information to the replacement router by settingswitches, for example. The need for a person to intervene to make thesesettings introduces the potential for setup errors which can thenprevent the system from functioning normally.

A problem with the router and router startup procedure according to theprior art as described above is that when there is another router on anyof the subnets to which a router that is replaced or reset belongs and aNet ID is already assigned to those subnets, the replaced or resetrouter does not function as a router but simply as another networkdevice. Communication with the subnets that should be connected by thereplaced or reset router is thus not possible.

A further problem with the router and router startup procedure accordingto the prior art as described above is that while a router that isreplaced or reset (referred to below as the “target router”) willfunction as a router when there is another router on one or more of thesubnets to which the target router connects but there is not a router ona different one or more such subnets, the parent router allocates a newNet ID to the subnet that does not have a router. The Net ID may thus bedifferent before and after the router is replaced or reset, and theparent router, subnet router, and network devices use a different Net IDto uniquely identify each network device on the subnet within thenetwork system. As a result, network devices on another subnet that hadbeen communicating with network devices on the subnet for which therouter was replaced or reset before the router was replaced or reset areunable to recognize that the network device identification information(Net ID) changed, and an error results when communication is nextattempted because the addressed network device cannot be found on thenetwork.

A further problem with the router and router startup procedure accordingto the prior art as described above occurs. That is, if communicationwith the parent router is not possible because there is another routeron one or more subnets to which the target router that is replaced orreset connects and there is not a router on another one or more subnets,or because, even though there is a router operable to start up as arouter, the parent router is separated via several subnets from thetarget router but there is a malfunctioning router somewhere between thetarget router and the parent router, then the target router cannotactivate its router function and can only startup as another non-routernetwork device. Communication between network devices on subnetspreviously connected by the target router is also disabled until theentire system resets.

SUMMARY OF THE INVENTION

The present invention is directed to solve these problems, and an objectof the invention is to provide a routing device and startup method forthe same whereby a previous setup can be automatically maintainedwithout disrupting operation of a part or all of the system when theentire system resets or a specific router is replaced or isindependently reset.

According to the invention, a router which is newly connected to asubnet or is re-started acquires identification data to uniquelyidentify the router on the network from the other routers or networkdevices other than routers on the subnet to which the router connects.This allows the router to start up with previous subnet identificationdata upon a replacement or restart of the router.

A method according to the present invention is a startup method of arouting device connecting plural networks on which the other routingdevices are connected. A parent router which manages networkidentification data to identify the plural networks is connected to oneof the plural networks. The other routing devices connected to theplural networks have master router data. The master router data includesmaster router identification data identifying whether the other routingdevice is a master router which is located on a path to the parentrouter or a slave router which is a routing device other than the masterrouter, and includes network identification data identifying a networkto which the other routing devices are connected. On startup, the masterrouter data is acquired from the other routing devices on the networksto which the routing device connects. Then it is determined whether arouter function of the routing device is enabled based on the acquiredmaster router data.

The router function may be disabled when all master routeridentification data in the acquired master router data indicate theslave router.

The router function may be disabled when acquiring two or more masterrouter data having master router identification data indicating themaster router.

The routing device may be started up with the router function enabledwhen acquiring one master router data having the master routeridentification data indicating the master router.

When a communication device connected to the networks has anidentification data to identify a network to which the device connects,the identification data may be acquired from the communication deviceconnected to the network to which the other routing device with themaster router identification data indicating the slave router connects.The routing device may be started up when there is at least one networkto which the network identification data is not provided. In this case,data relating to the parent router may be acquired from the otherrouting device having the master router identification data whichindicates the master router, and the routing device may request theparent router for a registration.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic drawing of a home network on which the presentinvention is deployed;

FIG. 2 shows a configuration of a home network on which the presentinvention is deployed;

FIG. 3 is a block diagram showing a configuration of a router accordingto the present invention;

FIG. 4 shows a data structure of router data of a router according tothe present invention;

FIG. 5 shows a data structure of parent router data of a routeraccording to the present invention;

FIG. 6A shows a network address uniquely identifying a router accordingto the present invention, and FIG. 6B shows a typical configuration of amessage used for communication by a router according to the presentinvention;

FIG. 7 shows a configuration of a network connected by a routeraccording to the present invention;

FIG. 8 shows a startup sequence for a cold start of a general router;

FIG. 9 shows a startup sequence for a warm start of a general router;

FIG. 10 shows a configuration of a network device connected to a subnet;

FIGS. 11A and 11B are flow charts showing the setup procedure when arouter according to the present invention starts up;

FIG. 12 is a flow chart showing another setup procedure when a routeraccording to the present invention starts up;

FIG. 13 shows an alternative configuration of router data of a routeraccording to the present invention;

FIGS. 14 and 15 are flow charts showing the setup procedure when arouter according to the present invention starts up;

FIGS. 16A to 16C are flow charts showing selected steps in the flowchart of FIG. 14 in detail;

FIG. 17 shows a startup sequence for a cold start of a general networkdevice;

FIG. 18 shows a startup sequence for a warm start of a general networkdevice (when there is a response to Net ID read request); and

FIG. 19 shows a startup sequence for a warm start of a general networkdevice (when there is no response to Net ID read request).

DETAILED DESCRIPTION OF THE INVENTION

Preferred embodiments of a routing device according to the presentinvention are described below with reference to the accompanyingfigures. A routing device (simply “router” below) as described below isa communication device with a function for interconnecting subnets in ahome network connecting multiple electrical devices together in anetwork as shown by way of example in FIG. 1.

DEFINITION OF TERMS

Specific terms used below are defined and used as follows.

“Target router”: A router for which a new subnet identificationinformation is to be set as a result of connection to a new network or aprocess for recovering from a power outage, for example.

“Parent router”: A router with a function for assigning Net IDs assubnet identifiers.

“General router”: Any router other than the parent router.

“Master router”: When there are plural routers on a subnet, a routerwhich is on a path to the parent router (that is, the first router onthe subnet to which a router address is assigned by the parent router).

“Slave router”: A router other than the master router within a subnet.

“Node”: A communication function on the network uniquely identified by anetwork address. This term is used for referring to a function as acommunication terminal on the network.

First Embodiment

FIG. 3 is a block diagram showing a configuration of a router accordingto the present invention. The router startup processor 310 runs aprocess for booting the router when the power supply turns on or therouter is replaced, for example. The all router data storage unit 311stores all information for routers in the whole system. The parentrouter data storage unit 312 stores information for the parent routerwhich assigns subnet Net IDs to the routers. The subnet ID code storageunit 313 stores the plural subnet ID codes of a router according to thepresent invention.

Subnet ID code requesting units 314 a and 314 b are activated by therouter startup processor 310 and run a process for requesting the Net IDfrom other routers and network devices on each subnet. Subnet ID codereporting units 315 a and 315 b report the Net ID of the router 31 whenthe Net ID is requested by another router. Subnet ID code confirmationunit 316 a and 316 b confirm a response to the request by the subnet IDcode requesting units 314 a and 314 b.

Received message interpreters 317 a and 317 b interpret receivedmessages and handle passing the messages to specific devices. Messagerouting processor 318 handles passing messages between devices ondifferent subnets (subnet A and subnet B in this example). Intra-subnetcommunication processors 319 a and 319 b process closed communicationsbetween devices on a single subnet.

It should be noted that a router (such as router 31, router 32, routerR1, . . . ) of the present invention that runs the startup sequencedescribed below is configured as shown in FIG. 3.

FIG. 4 shows one example of a structure of a self data (router data)held by a router according to the present invention. The router data mayinclude a router attribute such as data indicating whether it ispossible to provide a Net ID, or whether the router function isprovided. Router identifier 41 is provided by the parent router and is avalue enabling the router to be uniquely identified on the networksystem. Number of connected subnets 42 denotes the number of subnetsconnected to the router. Net ID 43 is the Net ID of one subnet (subnet Ain this example) connected to the router. Node ID 44 denotes the node IDof a router in one subnet (subnet A) connected to the router. Net ID 45is the Net ID of another subnet (subnet B in this example) connected tothe router. Node ID 46 denotes the node ID of a router in the othersubnet (subnet B) connected to the router. The number of heldcombinations of Net ID and Node ID equals to the number of subnetsconnected.

FIG. 5 shows exemplary a structure of the parent router data stored by arouter according to the present invention. The parent router identifiercontains the parent router Net ID 51 and Node ID 52 on the subnet towhich the parent router connects. This parent router data is stored inthe parent router data storage unit 312.

The parent router and general routers include all router data which isobtained by collecting the subnet ID codes as shown in FIG. 4 from allrouters on a network. The all router data is stored in the all routerdata storage unit 311. Router data relating to the subnets connected toa particular router is stored in the subnet ID code storage unit 313 ofthat router. An example configuration of all router data is shown below.

1 byte: number of all routers

2 byte or after: There are the following sets of the router data foreach router.

all router data 1 byte: Router ID

2 byte: number (n) of connected subnets

3 to (2×n+2) byte: Network address data held (for n)

Message

FIGS. 6A and 6B show an example of a communication message protocol. Anaddress of the parent router, the general router, or the network deviceon multiple subnets according to the present invention is uniquelydefined by a combination of the Net ID and Node ID as shown in FIG. 6A.

FIG. 6B shows an exemplary configuration of the message protocol. PR isa priority code, SA is a source address, DA is a destination address, CCis a control code, BC is a message length code, DATA is a messagestorage area associated with a network according to the presentinvention, and FCC is a message check code. PR, SA, DA, CC, BC, DATA,and FCC are based on a message configuration determined by each subnetand used in a network format defined within each closed subnet. Thesource address (SA) and destination address (DA) are thus addresses setwithin each subnet.

A message relating to a network of the present invention is stored inthe DATA area. The DATA area stores a header (HD), source networkaddress (SNA), destination network address (DNA), and object message(ODATA).

The object message (ODATA) area contains an object message header (OHD),source object specifier (SOJ), destination object specifier (DOJ),object property code (OPC), object service code (OSV), and object datavalue (ODT).

In this invention, SNA stores the network address containing the Net IDand Node ID of the source device, DNA stores the network addresscontaining the Net ID and Node ID of the destination device,respectively. Codes specifying a request for Net ID transmission and aresponse thereto is stored to the object service code (OSV). The valueof the Net ID in the response is stored to the object data area (ODT).

An example of the router 31 operation in a network as shown in FIG. 1and FIG. 2 when the power is turned on for the first time or the routerresets is described next. The router 31 in this embodiment is connectedto both subnet A (21) and subnet B (22).

Referring to FIG. 2 and FIG. 3, when router power turns on the firsttime or the router is reset, the router startup processor 310 of therouter 31 activates the subnet ID code requesting unit 314 a to run aprocess for acquiring Net ID from another router 32 or network device 21a or 21 b on the same subnet A (21) as the router 31. The subnet ID coderequesting unit 314 a assembles a message requesting Net ID from allrouters connected to the subnet A (21), and broadcasts the messagethrough intra-subnet communication processor 319 a to the subnet A (21).The content of this broadcast message requests the Net ID stored by eachrouter, for example.

A router 32 receiving this request interprets the received message byway of its intra-subnet communication processor, and then returns theNet ID. The subnet ID code reporting unit in the router 32 then readsand returns the Net ID for subnet A from the subnet ID code storageunit.

When the router 31 receives the Net ID for subnet A, the intra-subnetcommunication processor 319 a passes the received data through thereceived message interpreter 317 a to subnet ID code confirmation unit316 a. The subnet ID code confirmation unit 316 a sets the Net ID forthe subnet in the message received from the other router to the Net IDfor subnet A of the router 31 itself, and update, with this value, thevalue for Net ID 43 for subnet A stored in the subnet ID code storageunit 313.

Thus, if there is no change in the physical configuration of the networkbefore and after a router is replaced or reset, the replaced or resetrouter can start up using the Net ID used before the router was replacedor reset. Therefore, reallocating the Net ID to each device every timewhen the router is replaced or reset can therefore be avoided. In theabove description the request is done to the router prior to the devicesother than the router, and thus unnecessary communication and burdens ofthe devices other than the router can be reduced when a router exists onthe subnet.

It will be apparent that if there is no router on the subnet in thisexample a response to the Net ID request will not be returned and theNet ID of subnet A cannot be obtained. This creates the possibility thatwhen the router 31 is replaced with a different router or the router 31with all stored data is reset for some reason the router 31 will noteven be able to communicate. In this case the subnet ID codeconfirmation units 316 a, 316 b can announce the router startupprocessor 310 to acquire the Net ID from a network device other than arouter. This announce can be applied directly to the subnet ID coderequesting units 314 a, 314 b.

An operation to obtain Net ID from a network device is described next.

In order to establish a communication over subnet A, the router startupprocessor 310 or the subnet ID code confirmation unit 316 a first setsits own temporary Node ID as may be needed. Because this is aprovisional value, the Node ID is preferably set to a value such as themaximum or minimum value possible on the subnet, that is most unlikelyto be used by another device. Communication within the subnet A ispossible once this temporary device number is set.

A message is then broadcast over subnet A to acquire the Net ID storedby another device on subnet A. The Net ID of the device (such asrefrigerator 1, washing machine 2, or air conditioner 3) is thenextracted by the intra-subnet communication processor 319 a, thereceived message interpreter 317 a, and the subnet ID code confirmationunit 316 a in the transmitted sequence. The Net ID of the subnet A towhich a normally functioning router 31 was connected, can be confirmed.

Since there is a possibility that devices other than routers can bereset, the following priority process is done in the determination ofthe Net ID.

If the plural Net IDs obtained as described above include a Net ID for aparent router (controller 11) or general router, the Net ID from theparent router is preferentially recognized as the Net ID of the subnet Aconnected to the router 31.

If the plural Net IDs include a Net ID for a parent router or generalrouter and there are duplicated Net IDs, the most frequently duplicated(i.e., most numerous) Net ID is recognized as the Net ID for subnet A.For example, if the Net ID of “01” is detected twice and the Net ID of“03” is detected once, “01” is taken as the Net ID.

If the plural Net IDs do not include a Net ID for a parent router orgeneral router, the most frequent Net ID from the general devices isrecognized as the Net ID for subnet A. The recognized Net ID is thenstored in the Net ID memory area reserved for subnet A in subnet ID codeinformation storage unit 313. Thus, the most numerous devices can becommunicated.

By the above method, the communication in subnet A has been completelyactivated but the router identifier (Net ID) or Node ID of the routerare still temporary settings. Therefore, in order to completely restoresubnet A to the previous settings, if there is a parent router or otherrouter present, then the all router data is obtained from the parentrouter or other router, and the Node ID and router identifier of therouter 31 are reset using the previously acquired and interpreted NetID. The case that the parent router is present is a special case. A casein which the parent router is not on the subnet is described below for ageneral subnet.

Based on the result of interpreting the previously acquired Node ID foreach device on subnet A, the Node ID that is not in the Node ID sequenceis found. If Node IDs are 02, 03 and 04, for example, then a secondtemporary setting is done in which 01 is taken as a provisional Node IDfor the router. Otherwise, if Node IDs are 01, 02 and 04 are alreadyused, then a second temporary setting is done in which 03 is taken as aprovisional Node ID for the router. Then the Net ID of the subnet isacquired in the above described way. The acquired Net ID is then storedin the subnet A memory area in the subnet ID code storage unit 313.

The same operation is run on subnet B to set the Net ID and Node ID. Therouter 31 is thus able to communicate with other devices on both subnetsA and B, is therefore able to route communication over subnets A and B.This allows subnets A and B to be connected functionally.

It should be noted that subnets A and B can be the same or differenttypes of networks. Communication within subnet A or subnet B is on alayer below the communication layer related to the present invention,and is closed within each subnet, having separate communicationprotocols and a addressing system. It will be obvious that in the abovedescription the communication on this lower layer has been establishedand intra-subnet communication processors 319 a, 319 b handle thecommunication on this lower layer.

A communication method for achieving a request process and recoveryprocess of Net ID and Node ID for the router and network devices asdescribed above is described in detail below.

The configuration of a network device 21 b . . . is described first withreference to FIG. 10. Referring to FIG. 10, the subnet ID code storageunit 713 stores Net ID of the subnet allocated to the network device.The subnet ID code reporting unit 715 returns the own Net ID stored inthe device when requested by another router to report the Net ID. Thesubnet ID code confirmation unit 716 confirms the content of theinformation requested by the subnet ID code requesting units 314 a, 314b of the router shown in FIG. 3. The received message interpreter 717interprets received messages and passes the result on to a specifieddevice. The device function processor 718 executes the function of thenetwork device according to the received message. The intra-subnetcommunication processor 719 handles a closed communication within thesame subnet.

An operation and process for the router (target router) 31 to acquire aNet ID is described next with reference to the flow chart thereof shownin FIG. 11A.

When the router 31 starts up, it does not necessarily recognize the NetID of the own subnet as shown in FIG. 4. The target router thereforesends a request over the subnet A to require the Net ID. The subnet IDcode requesting unit 314 a therefore compiles a message. The Net ID 43and node ID 44 of subnet A stored in the subnet ID code informationstorage unit 313 are set to the SNA field of this message. The Net ID 43of subnet A is, however, not necessarily correct. The Node ID is atemporary value, such as the highest possible value, that is not likelyto have been assigned to another node. This temporary value can bevariously determined, such as a predetermined value by DIP switches onthe router 31 or a value stored before the reset. The destinationaddress DNA is set to a value designating all of devices in the subnetat a broadcast. HD is an identifier denoting a broadcast. The objectproperty code (OPC) is an identifier denoting a Net ID. The objectservice code (OSV) is an identifier denoting a read request. The objectdata (ODT) is empty. The values stored to other fields in the messageconfiguration shown in FIG. 6 are not directly related to thisembodiment of the invention and consideration thereof is thus omittedhere.

HD, SNA, DNA, and ODATA are then passed to intra-subnet communicationprocessor 319 a. Because a broadcast is indicated, the intra-subnetcommunication processor 319 a sets a code to denote a broadcast to PR,sets an address for broadcast communication to DA, stores HD, SNA, DNA,and ODATA to the DATA field, and then transmits the resulting messageover subnet A. This operation is completed in step S11 in FIG. 11A.

It should be noted that the address used for SA and DA on the subnet ofthe router can be determined immediately after the router starts up.Therefore, each of SA and DA is in a state operable to functioncorrectly.

A parent router, a general router, and a network device are connected tosubnet A, and receives messages in their respective intra-subnetcommunication processors. An example operation in which the networkdevice receives a message is described below. It should be noted thatthe parent router and the general router also run the same operationwhen receiving a message.

Because the received message was broadcast, the intra-subnetcommunication processor 719 of the network device passes the message tothe received message interpreter 717. The received message interpreter717 then passes DNA to the subnet ID code confirmation unit 716, whichcompares the own network address stored in the subnet ID codeinformation storage unit 713 with the received DNA for examination.While no particular problem results if the Net ID in the DNA matches theNet ID in the own network address, they usually do not match. Thereceived message interpreter 717 therefore interprets OPC and OSV. As aresult of interpretation it is found that the received message indicatesNet ID request, and thus the received message interpreter 717 respondsto the request and makes a response message without destroying themessage.

The network device that received the message checks the hop count andNet ID of the received message. When the Net ID of the source differsfrom the own Net ID, the network device may destroy the received messageeven if the hop count is 0. In this case the router increments the NetID in the message for acquiring the subnet Net ID to resend the messageuntil a Net ID that can be received by the network device is found. Aspecial code causing the network device to not destroy the messageregardless of a Net ID mismatch can also be defined and added to themessage.

The received message interpreter 717 then instructs the subnet ID codereporting unit 715 to generate a response message. SNA is the ownnetwork address stored in the subnet ID code information storage unit713. DNA is the SNA of the received message. OPC or OSV is an identifierdenoting a response to the Net ID request. The own Net ID is written toODT. The subnet ID code reporting unit 715 then passes HD, SNA, DNA, andODATA to the intra-subnet communication processor 719. Because SA and DAof the received message are already known to the intra-subnetcommunication processor 719, it transposes SA and DA, inserts the HD,SNA, DNA, and ODATA to the DATA field, and returns the response.

This operation is completed in step S12 in FIG. 11A.

The intra-subnet communication processor 319 a of the router 31 monitorsmessage traffic on the subnet A, captures messages addressed to therouter 31, and passes to the received message interpreter 317 a thecontent of the DATA in the response message.

The received message interpreter 317 a passes DNA to the subnet ID codeconfirmation unit 316 a. The subnet ID code confirmation unit 316 acompares DNA of the message with SNA used in the Net ID request messageor Net ID 43 of subnet A stored in the subnet ID code storage unit 313to confirm if the message was addressed to the router. The receivedmessage interpreter 317 a interprets OPC, OSV as a response to the NetID request, and extracts Net ID from ODT and temporarily stores it tothe subnet ID code confirmation unit 316 a. This operation is completedin step S13 in FIG. 11A.

Because the Net ID request message transmitted by the router 31 is abroadcast message, all devices (including parent router and generalrouters) on the subnet A receive the message and return the subnetidentifier code information stored by the device.

The router 31 also temporarily stores this Net ID to the subnet ID codeconfirmation unit 316 a through the above operation. This process isalso completed in step S13 in FIG. 11A.

As previously described above, the router 31 receiving multiple Net IDs,prioritizes Net ID to be selected in order by a parent router, a generalrouter and a network device, selects one Net ID, and stores the selectedone to the subnet ID code storage unit 313. Thus, the one Net ID canalso be selected from the multiple codes by majority rule when there isno parent router. This enables a communication in which the mostnumerous device can communicate. It should be noted that a default NetID, indicating that a Net ID has not been assigned to the subnet, is notselected. Furthermore, if the Net ID previously stored by the router isincluded in the multiple Net IDs, that Net ID can be selected. Thisoperation enables the router to use a Net ID already assigned and usedon the subnet A. This operation is completed in step S14 of FIG. 11A.

Next, the subnet ID code confirmation unit 316 a examines the Node ID inthe network address received and temporarily stored from each device onsubnet A, and writes an unused Node ID as the Node ID 44 of subnet A inthe subnet ID code storage unit 313. As described above, if the array ofNode IDs contains an unused (skipped) value, this unused value iswritten. Furthermore, while it is possible that the previously usedprovisional Node ID duplicates another Node ID, the process describedabove eliminates the possibility of such duplication. This operation iscompleted as step S15 in FIG. 11A. Step S15 may not be executed becausethe communication has been already possible.

It should be noted that while the process described above simultaneouslyacquires Net ID and Node ID, the router can ask the parent router,general routers, and network devices. This process is shown in the flowchart in FIG. 11B and described briefly below. The target router 31first asks the parent router, general routers, and network devices toreturn their Node ID (step S21). The parent router, general routers, andnetwork devices interpret the received messages and accordingly returntheir own Node IDs (step S22). The target router then interprets thereturned messages and confirms that the received messages are responsesto the inquiry (step S23), and then selects and stores a Node ID otherthan one of the plural returned Node IDs (step S24). In this method itis enough to define and use the identifier for OPC denoting a Node IDrequest and a response.

The router 31 runs the same operation to devices and routers on thesubnet B and thereby can acquire Net ID of the subnet B and a unique(unused) Node ID.

The router generates a message requesting the parent router data shownin FIG. 5, that is, the Net ID of the parent router, which is stored inthe parent router data storage unit 312 of the parent router and otherrouters, and using the same procedure described above can acquire andstore the parent router data in its parent router data storage unit 312.To accomplish it is enough to provide a parent router data request andan identifier for response in OPC.

An operation and procedure for restoring the Node ID allocated to therouter on subnets A and B before the router was replaced or reset isdescribed next with reference to FIG. 12.

The router identifier, Net ID, and Node ID previously allocated to therouter 31 are stored in the all router data storage unit 311 of theparent router and general routers using the format shown in FIG. 4. Therouter 31 compiles a message to the parent router and general routers inwhich an identifier for requesting the Node ID and router identifier ofthe target router 31 is written to OPC, the Net ID of subnets A and Bobtained from the above operation is written to ODT, and the targetrouter's Net ID and Node ID obtained by the above-described operationare stored to SNA. The router 31 then broadcasts this message to bothsubnet A and subnet B. This operation is completed in step S31 in FIG.12.

The parent router and general routers on subnets A and B interpret OPCand OSV in this message. When recognizing the identifier denoting arequest for the router Node ID and identifier, they extract Net IDs forthe subnet A and B from ODT, and then search the subnet identifier codeinformation for each router in the all router data storage unit for arouter having the same subnet IDs. The router identifier, Node ID onsubnet A, and Node ID on subnet B are then returned to the targetrouter. For the return, an identifier indicating that ODT contains theNet ID for the router is used for OPC. DNA of the return message can bethe Net ID previously obtained and Node ID selected from unused NodeIDs, which are in SNA of the message from the target router. The returnmessage does also not need to be broadcast, and can be delivered to justthe target router. This operation is completed as step S32 in FIG. 12.

The received message interpreter 317 a, 317 b of the target routerinterprets OPC and OSV in the received message to determine that themessage is a response to the previous request. Subnet ID codeconfirmation unit 316 a, 316 b then extracts the Node ID from ODT, andstores it to the subnet ID code storage unit 313 and the router datastorage unit 311. This operation is completed as steps S33 and S34 inFIG. 12.

The router can thus be reset to have the same Node ID used on subnets Aand B before the target router was replaced or reset. The target routercan thus startup with its router function enabled.

If in the process described above for acquiring Net ID it is determinedthat the all router data contains Net IDs suggesting that another routerconnecting the same two subnets as the target router is already present,the parent router or general router announces to the target router thatanother router is already connecting subnet A and subnet B to make thetarget router start up not as a router but as simply another networkdevice. This is to prevent forming a loop through multiple routers.

The content of the all router data need not be interpreted by the parentrouter and general routers to which the request is sent. Morespecifically, the target router could request the parent router andgeneral routers to return the all router data. The target router thencould interpret the returned all router data to detect the Node IDpreviously assigned to itself thus to check for a router loop. This canbe accomplished by assigning an appropriate identifier. The request andresponse can be generated as described above, and further descriptionthereof is thus omitted here.

In the process described above for acquiring the Net ID, if it isdetermined as a result of examining all of the Net IDs that dataindicating that there is another router connecting the same two subnetsas the target router is included in at least one Net ID entry in the allrouter data obtained from the other routers, the target router starts upnot as a router but as simply another network device. This is to preventforming a loop through multiple routers.

When all router data for routers connected to the subnet is acquired byrequesting to routers other than the target router on the subnetconnected to the target router, based on information related to a routerdisplacing between the same subnets as the subnet connected to thetarget router, the router function may be started with Node ID of eachsubnet connected to the target router changed to be the same as theacquired data. Thus the router can be restored to a status before thereplacement or re-start. The other device can use information previouslyused before to designate the router. It does not need to change settingsadditionally.

At the change of the target router, or initial start or re-start of thetarget router, when it is determined that the subnet identifier for theconnected subnet in at least one of subnets connected to the targetrouter is a default value (status in which a subnet value is notprovided), a routing operation of the message may not be started untilthe subnet identifier with a default value is provided from the parentrouter (a routing device having a function to provide a subnet value).Thus when the parent router attends the system, it is possible toprovide only a subnet having a default value of the subnet identifierwith a new value without changing information of devices having thesubnet identifier already assigned. Thus, easy system management can beachieved. This achieves a system in which user's confusion can bereduced at home in a home network and a necessity of an expert isreduced thus to achieve easy exchange of the router, and a depression ofthe function of the system is suppressed.

If a message addressed to another device on the subnet is receivedfaulty and executed by a device other than the addressed node, thesubnet could be disrupted depending upon the content of the message. Onemethod of preventing this is described below.

A hop count indicating the number of passes around the subnet isincluded in the message header HD using three bits, for example. Thishop count is initially 0 and increments one each time a message ispassed by the router to another subnet. The hop count is normally 0 ifthe Net ID in the source network address SNA of the received messagematches the Net ID of the receiving device and the device it self.Therefore an error occurs when the Net ID in the source network addressSNA of the received message does not match the Net ID of the device andthe hop count is 0, and the received message is destroyed. Each deviceis thus prevented from receiving a wrong message.

However, when the target router requests other routers or networkdevices to send the Net ID as described above, a Net ID different fromthe current Net ID of the subnet could be used for the source networkaddress SNA. The problem here is that if the above error handlingprocess is applied the message will not be received and will bedestroyed, and it may not be possible to learn the Net ID.

It is therefore preferable to not destroy the message and return the NetID if OPC is an identifier denoting a Net ID request. SNA of theresponse message is therefore the same value as the Net ID used by therouter requesting the Net ID. The Net ID request message is thereforenot destroyed and a response message is transmitted. The target routeris able to receive the response normally because the returned Net ID inSNA of the received message and the Net ID of the target router matchand the hop count is 0.

If the operating sequence for requesting a Net ID as described abovecannot run for some reason, the following process can be applied.

The target router sends a series of messages in which the value of theNet ID in SNA of the Net ID request message requesting the Net ID issequentially changed. When the Net ID of the device that received themessage does not match the Net ID in SNA, a response message is notcompiled since this corresponds to the above described error state. Whenthe Net IDs match, however, the error handling process is not run, anappropriate response returned to the target router, and the targetrouter can therefore acquire the Net ID. DNA of the response message isSNA of the received message so that the target router can receive theresponse. In this way, If the Net ID is 8-bits long, the target routercan acquire the Net ID by sending the Net ID request at most 256 times.The request can be sent 256 times by creating and sending 256 uniquerequests at once, or by sending a request for the next Net ID when areply is not received within a predetermined time.

Because an error process is not run for messages requesting the Net ID,the present invention can normally quickly determine the Net ID withoutbroadcasting multiple Net ID requests.

If the Net ID in SNA of the received message is a specific value such as0x00, all devices or routers on the subnet can process the receivedmessage according to the contents of the message without destroying iteven if the Net ID in the message does not match the own Net ID. Themessage can be prevented from being destroyed regardless of the value ofOPC. It is also possible to process the message without destroying itonly when OPC is set to a specific value, for example to the identifierof a message requesting the subnet identifier code or Net ID as noted inthe problem of the prior art.

Furthermore, a specific process designation field may be provided in aNet ID request message. If the specific process designation is set, theNet ID can be returned without checking for a match between Net ID inSNA and the own Net ID, or when a mismatch is detected as a checkingresult.

Yet further, HD, SNA, DNA, OHD, SOJ, DOJ, OPC, and OSV of the receivedmessage may be interpreted and a response may be sent except when themessage is clearly not addressed to the received devices or routers.

Furthermore, a specific process designation field may be provided in aresponse message to Net ID request message. If the specific processdesignation field is set, the received Net ID can be retrieved andstored without checking for a match between the SNA, and self Net ID orNet ID in the network address, or when a mismatch is detected as achecking result. Yet further, HD, SNA, DNA, OHD, SOJ, DOJ, OPC, and OSVof the received message may be interpreted, and the Net ID can beextracted and stored except when the message is clearly not addressed tothe received devices or routers.

As described above, the system is configured so that a response is madeto a Net ID request from a network device of which Net ID is set to thedifferent value from the Net ID of the subnet connected to the router,in which the Net ID request is closed in the subnet connected to thenetwork device. Thus, in order to know Net IDs of connected subnets, therouter which is replaced or re-started does not need to use with Net IDsof all subnets and therefore data traffic in the subnet can be reduced.A burden in processing of the router which likes to know identifiers ofconnected subnets can also be reduced.

The configuration and operation of the message generation process andreceiving process when requesting the Net ID and Node ID from the routerare described above. The same principle can be applied to restorenetwork devices to the previous status by asking the parent router,general routers, and other network devices for the Node ID and Net ID,particularly by requesting the previously used values.

As described above, when a network device connected to one of the pluralsubnets connected to a router is queried by the router for its Net ID,it returns the own Net ID stored by the device even when the Net ID ofthe router does not match the Net ID of the device. It is enough toprovide a broadcast communication identifier in the header HD.

The object service code OSV described above is an identifier indicatinga request service or a reply service for the Net ID, or the Node ID, theparent router data, or the all router data of the destination device.Determining the identifier shall not be so limited, however. In any ofthe object data header OHD, source object specifier SOJ, destinationobject specifier DOJ, and object property code OPC, an identifier may beprovided to provide a identification function described above.

Furthermore, an identifier such as a router profile or node profile, forexample, for classifying the receiver as a parent router, generalrouter, or network device can also be provided. These identifiers may bewritten in DOJ of the message, for example. The device or routerreceiving messages captures only those messages with an identifierindicating that device or router. The number of responses can be reducedeven when the request message is broadcast over the subnet, and networkcongestion can therefore be reduced.

Further, an identifier such as a router profile or node profile forclassifying the source as a parent router, general router, or networkdevice can also be provided. If this identifier is written in SOJ, forexample, devices and routers receiving the response can be configured tocapture only those messages with an identifier denoting the same groupas that device. It is therefore possible to avoid needlessly processingresponses, and the load on the receiving devices can be reduced.

A further identifier for denoting the destination as belonging to aparent router group, general router group, or network device group canalso be provided. When the devices and routers then only capturemessages containing an identifier corresponding to itself, Net IDs andNode IDs can be efficiently restored as described below.

That is, the target router first creates and broadcasts a message to theparent router asking for the all router data. If there is a parentrouter, the Net ID and Node ID can be obtained from the all router datastored by the parent router. If there is no response from a parentrouter, a request for all router data is sent to the general routers. Itmay be possible to restore the Net ID, Node ID, and router identifier ofthe target router from the all router data returned from one or morerouters.

If there is no response from the general routers, no router is operatingon the subnet, and a message requesting subnet identifier codes is sentto the network devices. The subnet identifier code (Net ID data) of thetarget router can then be restored from the Net IDs and Node IDscollected from the network devices.

By executing a request for Net ID in this sequence, the number ofresponses sent can be further reduced even when the request isbroadcast, and network congestion can therefore be reduced.

What type of information is handled by a particular message can also bedetermined by providing an identifier in OPC, for example, indicatingthe type of information (e.g., Net ID or Node ID) requested or stored inODT. When a further identifier is provided in OSV to indicate whetherinformation is being “requested” or “reported”, the destination deviceor router can recognize what process to run to the value in ODT.

It will also be obvious to one with ordinary skill in the related artthat while this embodiment has been described with the router directingtraffic between two subnets, subnets A and B, a router for routingtraffic among three or more subnets can be achieved by configuring eachof the subnets as described above and running the same processes on eachof the subnets. It will be further obvious in this case that the subnetidentifier code of the router shown in FIG. 4 will have three or moresets of Net IDs and Node IDs, and the number 42 of connected subnetswill be 3 or more.

It will also be obvious that each of the means and processors shown inFIG. 3 and FIG. 10 can be configured as dedicated electronic circuitsperforming the respective operations described above. They can also beachieved by a computer running a computer program implementing the stepsof the processes described above with reference to the accompanying flowcharts.

From the above description, the network configuration that existedbefore a router was replaced or reset can be completely restored bygradually extending the communication range to restore communication onthe subnets A and B directly connected to the router, restorecommunication with the parent router (controller 11) or other generalrouters, and communicate the all router data.

It is therefore possible to replace a router, which is an essentialnetwork device, with a router featuring improved performance or apreviously used old router for temporary service when a router fails,without requiring a device or network administrator to repeat acomplicated configuration process. The present invention thereforeprovides a router that is particularly convenient and advantageous forthe user.

The present invention shall not be limited to this embodiment and can beapplied to routers that do not have a router identifier, that do notmanage the Net ID and Node ID separately, or that requires anidentification number setting as well as the Net ID and the Node ID.

More specifically, included in the scope of the present invention is anymethod for acquiring, analyzing, and temporarily setting a Net ID andNode ID for the router in order to first enable communication with theconnected subnet(s), and then sequentially changing these temporaryrouter settings to gradually extend the communication range using thetemporary settings until the final settings are determined.

Furthermore, any apparatus or method for extending the communicationrange by similar means to a correct data source, such as a controller(parent router) or general router, and then acquiring and setting thecorrect configuration settings, is also included in the scope of thepresent invention.

Second Embodiment

The startup sequence of a router in a network including a master routerand slave router is described. In addition to the router identifier, NetID, and Node ID described above, master router data is also provided asthe router data. The master router data includes a Net ID and flagidentifying the router as a master router.

When the router receives a message relating to a router profile propertyread request, it returns a response even if the hop count is 0 and theNet ID in the source network address SNA of the received message differsfrom the Net ID stored by the router. The value of the Net ID in SNA ofthe response from the router is 0x00 in this case (It should be notedthat a specific value indicating that on the receiving side receivingprocess is performed even when the Net ID in SNA is different from theself Net ID is denoted by 0x00 below).

Therefore, if there is a request relating to such router data as the NetID, master router data, or all router data, the router can receive themessage even if the destination Net ID in the message differs from theown Net ID. (Rule A)

In each device, if the hop count is 0 and the Net ID of the source is0x00, it receives messages addressed to itself even though the Net IDdoes not match the Net ID of the device. (Rule B)

As a result, if the device is moved and connected to a physicallyseparate subnet, a new Net ID will be assigned as described below.

First, the device requests a Net ID to the router. According to the ruleA the router accepts the request. The router sets its own source Net IDto 0x00 when sending the Net ID to the device, then the device canreceive the response.

The router is internally segmented into a slave router and a masterrouter, as shown in FIG. 7. The slave router is the router which iscloser to the parent router, while the master router is the router whichis farther from the parent router. If three or more subnets areconnected to a single router, there is only one slave; all others aremasters.

When there are other routers on the subnet, the router request themaster router data to each router on the same subnet at the startupsequence. If the master data indicating that the router is a masterrouter is included in the master router data sent from each router, theNet ID of the master router data for the master router is set as the NetID of the subnet connected to the target router.

If there is no master router amongst the other routers, they are allslave routers. The Net ID in the returned master router data istherefore not used, and the same process (further described below) runwhen there is no other routers on the subnet is run.

The process run when there is no other routers on the subnet, that is,when there is no response from routers, is described next.

The target router requests the Net ID to all devices connected to thesubnets connected to the target router. It then compares its own Net IDwith the Net IDs returned from the devices. If the comparison shows theNet IDs do not match, the target router does not start up as a router.If there is a match, the target router queries the parent router toconfirm if the Net ID received from the devices can be used. Based onthe data (that is, the all router data) stored by the parent router foreach of the routers, the parent router confirms whether the queried NetID can be used. If the parent router returns permission to use the NetID, the target router uses that Net ID. If the parent router determinesthe Net ID cannot be used and therefore prohibits using the Net ID, itreturns 0x00 as the router identifier for the target router. In thiscase, the querying router is prohibited from starting up as a router.

It should be noted that this process can also be used when there isanother router on the subnet but a response is not returned by therouter.

Only the master router sends a Net ID write request which is sent todevices other than routers. The master router accepts write requestsonly from the parent router, and the parent router does not accept writerequests from other routers.

The configuration of the above-described router and the operation andprocedure for setting the Net ID and Node ID based on that configurationare described next. The procedure is described with reference to theflow charts in FIG. 14 to FIG. 16. Note that dotted lines in the flowcharts indicate execution of another task or a wait state waiting for anext command.

As noted above a router in this embodiment of the invention includes amaster router part and a slave router part. As also noted above therouter is connected to two or more subnets.

If two subnets are connected, the router part corresponding to thesubnet that is “close to the parent router” (or is “facing the parentrouter”) is the slave router part, and the remaining part is the masterrouter part. Which part becomes the master router is thus determinedaccording to the overall network configuration, including the locationof the parent router and how the subnet is connected. In theconfiguration shown in FIG. 7, for example, there is a router R1connecting subnet A and subnet B, and the parent router Rp is connectedto subnet A. If router R1 is the master router for subnet B, the side ofrouter R1 farther from parent router Rp is master router part R1 m andthe side close to parent router Rp is slave router part R1 s.

In the router configuration shown in FIG. 3 the side connected to eithersubnet A or subnet B is the master router. Router attribute data isprovided to identify the master and slave parts. In addition to thesubnet identifier code configuration shown in FIG. 4, master router datais provided for each subnet, i.e., subnet A master router data andsubnet B master router data are provided. An area to store the masterrouter data is also provided. In other words, as shown in FIG. 13,master router data 47 for subnet A is provided in addition to Net ID 43of subnet A and Node ID 44 of subnet A. Subnet B master router data 48is also provided in addition to Net ID 45 of subnet B and Node ID 46 ofsubnet B. These subnet identifier codes are stored to the subnet ID codeinformation storage unit 313.

The all router data storage unit 311 stores the subnet identifier codesincluding this master router data for all routers in a table, forexample. The parent router data storage unit 312 stores the masterrouter data in addition to the parent router Net ID and Node ID. Themaster router data comprises two values, the Net ID of the connectedsubnet and a master identifier code for identifying the master routerand slave router.

The Net ID in the router attribute data for the master router part isthe Net ID of the connected subnet, and the Net ID in the master routerdata for the slave router part is 0x00, for example. It should be notedthat 0x00 is a value not used as a Net ID. In one exemplary embodimentthe router attribute data is a 2-byte value, the first byte storing amaster router identifier indicating a master router or slave router(where a master router=0x41 and a slave router=0x42), the second bytestoring the Net ID.

FIG. 7 shows a network with subnets A, B, C, D linked with routershaving a master router part and a slave router part. So that the pluralrouters do not create a loop, general routers R1, R2, R3 are arranged inone direction towards parent router Rp. The part of each router closerto the parent router Rp on this path is the slave router and the otherpart is the master router. Of the plural routers connected to eachsubnet, only one is connected as a master router and all others areconnected as slave routers. A loop results if there are two masterrouters on a single subnet. Therefore, if two or more master routers aredetected the routers can be prevented from starting up, an error can bedetected and a standby state imposed, or other appropriate action can betaken. If a router is managing traffic between three or more subnets,there is only one slave router part inside the router.

The Net ID of each connected subnet is stored in the Net ID of themaster router data for the master router part of each router. In theexample shown in FIG. 7 the Net ID for each subnet A, B, C, and D, thatis, 0x01, 0x02, 0x03, and 0x04, is stored as to the Net ID in the masterrouter data of the master router part.

As described above with reference to the message configuration shown inFIG. 6B, message content in the present embodiment is stored to the DATAfield. The DATA field contains a header HD, source network address SNA,destination network address DNA, and object message ODATA. The objectdata ODATA field stores the object message header OHD, source objectspecifier SOJ, destination object specifier DOJ, object property codeOPC, object service code OSV, and object data ODT.

For the destination object specifier DOJ, provided are either a routerprofile identifier code (0x0EF101) denoting a router data to be handled,and a node profile identifier code (0x0EF001) denoting a network addressfor the node to be handled.

For the object property code OPC, provided are a master router dataproperty (0xE6) denoting master router data to be handled, Net IDproperty (0xE1) denoting a Net ID to be handled, a parent router dataproperty (0xE3) denoting parent router data to be handled, all routerdata property (0xE4) denoting all router data to be handled, a routerregistration request property (0xE5) indicating a router registrationrequest to be handled, a router information property (0xE0) denoting theown router data to be handled, and an instance change class announceproperty (0xD5) indicating an instance change to be handled.

For the object service code OSV, provided are a read request (0x62), areport request (0x63), a write request (0x60) and (0x61), and a report(0x73).

For the destination network address DNA, an intra-subnet broadcast(0x01FF) is provided.

A procedure for restoring and re-registering the network address when arouter reconnects to a subnet from a stand-by state due to a poweroutage and so on is described with reference to the flow charts in FIG.14 and FIG. 15. The router connected to subnet A and subnet B shown inFIG. 7 is the target router in the following description.

The target router first broadcasts a message (1) through subnets A and Bto have all routers including the parent router on subnets A and Breport the master router data. The message (1) in this instance isdefined as follows.

SNA: a network address of the target router stored therein

DNA: a code denoting intra-subnet broadcast with HD denoting a broadcast

DOJ: a code denoting a router profile object (0x0EF101)

OPC: a code denoting a master router data property (0xE6)

OSV: a code denoting a read request (0x62)

ODT: any data

If there are other routers on subnet A or subnet B, each other routerreturns a master router data read response in a message (2). The message(2) in this time is defined below.

SNA: a network address stored in the other router with Net ID set to0x00

DNA: SNA from the message (1)

DOJ: a code denoting a router profile object (0x0EF101)

OPC: a code denoting a master router data property (0xE6)

OSV: a code denoting a read response (0x72)

ODT: master router data of the other router

In step S41, the target router then receives and interprets the returnedmessages (2) to examine the collected master router data. When masterrouter data indicating that the router is not a slave router is returnedfrom two or more routers, a loop exists or may exist on the network. Thetarget router therefore starts up as a simple network device or in astandby mode, and the router function is not enabled. When there are 1or 0 master routers, the procedure advances to the next step. A flowchart of the operation of step S41 is shown in the flow chart in FIG.16A.

It should be noted that it is also possible to not enable the routerfunction if there is no other master router on the network as indicatedin FIG. 16C. This case is described further below.

When no message (2) is returned, there is no other router on thenetwork. The target router therefore boots as a network device or entersa standby state.

When it is confirmed that the number of master routers on the subnet is0, the Net ID recovery routine is run. In this routine the target routerasks all devices on subnets A and B to return their Net ID bybroadcasting message (3). The message (3) is defined as follows.

SNA: network address of the target router stored therein with the Net IDset to 0x00

DNA: a code denoting intra-subnet broadcast

DOJ: a code denoting a node profile object (0x0EF001)

OPC: a code denoting a Net ID property (0xE1)

OSV: a code denoting a read request (0x62)

Since the hop count is 0 and the Net ID in SNA is 0x00 in message (3),each device on subnets A and B receives a message (3) and responds tothe request by returning the Net ID set in the respective device in amessage (4). The message (4) is defined below.

SNA: a network address of the device

DNA: SNA in the message (3)

DOJ: a code denoting a node profile object (0x0EF001)

OPC: a code denoting a Net ID property (0xE1)

OSV: a code denoting a read response (0x72)

ODT: Net ID (may be network address including Node ID)

In step S42, the target router compares the subnet configurationindicated by the Net IDs collected from messages (4) with the subnetconfiguration stored by the target router when the number of masterrouters is 0. If those subnet configuration differ, the target routerdoes not enable the router function.

If the number of master routers is 0 and the stored subnet configurationis the same as the confirmed subnet configuration, the target routerstarts up with its router function enabled based on the storedconfiguration settings.

If the number of master routers is 1, the target router communicateswith the master router using messages (5), (6) and messages (7), (8) toacquire the parent router data and all router data. It should be notedthat the master router could be the parent router.

The message (5) is defined as follows.

SNA: network address stored in the target router or the network addresswith the Net ID set to 0x00

DNA: a code denoting the master router obtained by the message (2)

DOJ: a code denoting a router profile object (0x0EF101)

OPC: a code denoting a parent router network address property (0xE3)

OSV: a code denoting a read request (0x62)b

The master router receives and interprets the message (5), then compilesand sends message (6). The message (6) is defined as follows. SNA storesnetwork address of the master router. DNA stores SNA in the message (5).DOJ stores a code denoting router profile object (0x0EF101). OPC storesa code denoting parent router network address property (0xE3). OSVstores a read response (0x72). ODT stores parent router data.

Message (7) is defined as follows. SNA stores the stored network addressor stored network address with the Net ID set to 0x00. DNA stores a codedenoting master router. DOJ stores a code denoting router profile object(0x0EF101). OPC stores a code denoting all router data property (0xE4).OSV stores a code denoting a read request (0x62).

The master receives and interprets message (7), and then compiles andreturns message (8). Message (8) is defined as follows. SNA stores anetwork address of the master router. DNA stores SNA in the message (7).DOJ stores a code denoting router profile object (0x0EF101). OPC storesa code denoting all router data property (0xE4). OSV stores a codedenoting a read response (0x72). ODT stores all router data.

In step S43 the router then interprets message (6) and message (8) toacquire the parent router data and all router data. If a network addressof a router connecting subnets A and B is included in the all routerdata, the router uses the network address and enables the routerfunction. Whether the network address for the router is included can bedetermined from Net IDs for the subnets A and B and the all router dataobtained from message (4) or messages (2) and (4).

If there is no parent router, the all router data is obtained from themaster router. If the data stored by the router and the data from themaster router matches the subnet configuration confirmed in step S42,the router starts up as a router using the stored data, and the stepsfollowing step S42 are unnecessary. If these three do not match, therouter function is not enabled, the rest of the sequence is notnecessary, and the router boots as a network device or enters a standbystate.

If the number of master routers is 0, that is, there is no master routeron subnets A and B, or if the configuration of subnets A and B isunknown or uncertain, such as when the master router count is 0 and instep S42 the subnet configuration stored by the router does not matchthe configuration of subnets A and B indicated by Net IDs collected fromall device nodes, the router sends a router registration request to theparent router if the subnet identifier code of the parent router isknown. To accomplish this the following messages (9), (10), (11), (12),and (13) are exchanged with the parent router.

Message (9) is defined as follows. SNA stores a Net ID for subnet

A connected to the master router part. DNA stores a code denoting aparent router identified in the message (6). DOJ stores a code denotinga router profile object (0x0EF101). OPC stores a code denoting a routerregistration request property (0xE5). OSV stores a code denoting a writerequest (0x60).

The parent router considers the registration request and interprets theall router data to confirm there are no conflicts, such as loop path.Then the parent router assigns a router identifier, Net ID, Node ID, andmaster router data for the router, and responds to the requesting routervia message (10) to request writing the data to the subnet ID codestorage unit 313.

Message (10) is therefore defined as follows. SNA stores a networkaddress of the parent router. DNA stores SNA in the message (9). DOJstores a code denoting a router profile object (0x0EF101). OPC stores acode denoting a router data property (0xE0). OSV stores a code denotinga write request (0x61). ODT stores the own router data for the router,that is, router identifier, Net ID, Node ID, and number of connectednetworks.

The router then receives and interprets message (10), stores theassigned router identifier, Net ID, and Node ID to subnet ID codestorage unit 313, and returns a message (11) to notify the parent routerof completion of the data storage.

This message (11) is defined as follows. SNA stores assigned networkaddress. DNA stores network address of the parent router. DOJ stores acode denoting a router profile object (0x0EF101). OPC stores a codedenoting an own router data property (0xE0). OSV stores a code denotinga write response (0x71). ODT is empty.

When the parent router receives message (11), it sends the all routerdata to the router in a message (12).

This message (12) is therefore defined as follows. SNA stores a networkaddress of the parent router. DNA stores a network address assigned tothe router. DOJ stores a code denoting a router profile object(0x0EF101). OPC stores all router data property (0xE4). OSV stores acode denoting a write request (0x61). ODT stores all router data.

The router then receives and interprets message (12), stores the allrouter data to all router data storage unit 311, and returns message(13) to notify the parent router of completion of the data storage.

This message (13) is therefore defined as follows. SNA stores anassigned network address. DNA stores a network address of the parentrouter. DOJ stores a code denoting a router profile object (0x0EF101).OPC stores a code denoting all router data property (0xE4). OSV stores acode denoting a write response (0x71). ODT is empty.

The router thus obtains the router data in step S44.

The router then sends message (14) to write the assigned Net ID to eachdevice on the master side of subnets A and B.

This message (14) is therefore defined as follows. SNA stores a networkaddress for subnet A or B. DNA stores a code denoting intra-subnetbroadcast code (0x01FF). DOJ stores a code denoting a node profileobject (0x0EF001). OPC stores a code denoting a Net ID property (0xE1).OSV stores a code denoting a write request code (0x60). ODT stores a NetID.

The router also announces a change in status of both subnets A and B bybroadcasting a message (15).

This message (15) is defined as follows. SNA stores a network addressfor subnet A or B. DNA stores a code denoting a broadcast over domain.DOJ stores a code denoting a node profile object (0x0EF001). OPC storesa code denoting an instance change class announce property (0xD5)indicating a change in configuration settings. OSV stores a codedenoting a announce (0x73). ODT stores instance data to be stored.

As described above, this operation enables the router to start up andstart normal operation.

It should be noted that the present embodiment collects the Net IDsstored by each device on the subnets from messages (3) and (4) even whenthe number of master routers is 1, as shown in FIGS. 16A and 16B.However, if there is one master router, then the Net ID of the routercan be known for subnets A and B from the all router data and parentrouter data stored by the master router, and processing messages (3) and(4) can therefore be omitted.

Furthermore, when master router data denoting a master router isreturned it is also possible to trust the Net ID contained in the masterrouter data, and by setting that Net ID to the Net ID for the routerother steps relating to setting the Net ID can be omitted.

As further shown in FIG. 16B and described above, in case the number ofmaster routers is 0, when and the same subnet configuration isidentified by the collected (returned) data and the data storedinternally by the router, the router function can be enabled using thestored information. If the configurations differ, the router can startup as a network device without enabling the router function. The routerfunction is disabled in this case, an error message may be reported tothe router.

It is also possible to not boot up the router in step S41 when thenumber of master routers is 0 as shown in FIG. 16C.

In other words, if the collected master router data all indicate slaverouters, there may possibly be no parent router or other router, orthere may be a router malfunction, and a path to the parent routercannot be determined. The router therefore starts up as a network deviceor enters a standby state.

It should be noted that above master router data is a combination of aNet ID and a master identifier code, but the master router data could becomposed of only the master identifier code with the Net ID for theslave router part set to 0x00 and the Net ID for the master router partset to the Net ID of the subnet connected to the master router part.

It will also be apparent that the Node IDs are already assigned when anetwork on a lower layer closed in each subnet starts up, and these NodeIDs can be converted to and used as a Node ID in a subnet identifiercode within the network domain linking plural subnets to which thepresent invention is directed.

This embodiment of the present invention can thus easily prevent therouters from creating a loop. A router managing a subnet operates as themaster router for the subnet and managing subnet identifier codes iseasier. Furthermore, when this router is newly added to the network (acold start) or is temporarily removed from and then reconnected to thenetwork without resetting (a warm start), the router identifier, Net ID,all router data, and master router data can be set or restored to therouter in a short time.

It should be noted that a recording medium recording a program for therouter and the set up method of the router according to the presentinvention includes any computer-readable data storage medium capable ofrecording the program, including ROM, RAM, floppy discs, CD-ROM, DVD,memory card, or hard disk, or a communication medium such as telephonelines or other transmission medium.

Third Embodiment

The above embodiments describe a process for assigning a Net ID and NodeID to a router that is newly connected or restarted. This process forassigning a Net ID and Node ID can also be applied to a network devicefor which the network connection has changed. This application of theprocess to network devices is described below.

This embodiment applies to a case in which a device connected to onesubnet is moved and connected to a different subnet, such as when,referring to FIG. 2, the device 1 (22 a) connected to the subnet B ismoved and connected to the subnet A, and a Net ID and a Node ID areallocated to the device 1 (22 a) at the new network connection.

When a device is moved to a different subnet, the Net ID stored in thenetwork device will differ from the Net ID of the subnet to which thedevice is newly connected. Furthermore, since the Node ID must only beunique within a subnet, the Node ID could be the same as another Node IDalready used on the new subnet.

In such cases the device 1 (22 a) can query other network devicesconnected to subnet A for the Net ID to acquire an appropriate Net ID.The device 1 (22 a) can also query other devices on the subnet A toacquire their Node IDs and thereby find an unused Node ID.

This is described more specifically below.

When the device 1 (22 a) moves to a different subnet, it first sets itsown temporary Node ID. This temporary Node ID should be a number that islikely not already used on the subnet. It also sets a temporary codeindicating that “Net ID is unspecified” until its own Net ID is set tothe Net ID of the subnet A. These temporary settings enable the device 1(22 a) to communicate with other devices on the subnet A.

The device 1 (22 a) then queries the other devices on subnet A for theNet ID. It then sets its own Net ID with reference to a Net ID returnedby the other devices. In this case, the device 1 (22 a) may prioritizethe Net IDs using a majority rule as described above. Similarly thedevice 1 (22 a) then queries the other devices on subnet A for the NodeIDs, and sets its own Node ID to a value that will not duplicate anexisting Node ID.

It should be noted that the device 1 (22 a) could query the otherdevices to confirm whether or not the Node ID set to the device, beforethe temporary Node ID was set, is already in use on the same subnet. Ifit is not already used, the device 1 (22 a) could continue to use thesame Node ID.

Furthermore, the Net ID is temporarily set to “unspecified” as notedabove, but it could be set to a reserved code enabling communicationonly within the same subnet to which the device is connected. The Net IDcould also not be used.

When a network device changes its Net ID or Node ID it also sends thechanges (the Net ID and Node ID before the change, and the Net ID andNode ID after the change) to the parent router and general routers toupdate the all router data.

The router data can be updated by the device for which settings changedreporting the changes to the router. Alternatively, the parent router orgeneral router could examine each subnet based on an error event whichoccurs when another device or router performs a communication to thenetwork device that moved, and automatically update the router datarelated to the network device that moved.

The same process can also be applied to a new device connected to asubnet, and is thus not limited to network devices that move to adifferent subnet. In this case it is not necessary for the parent routerto assign a Net ID and Node ID, the device can automatically set its ownNet ID and Node ID, and the processing load on the parent router can bereduced.

When the hop count of a received message is 0 and the value of thesource Net ID in the received message differs from the value of the NetID in its own network address, the network device destroys the receivedmessage. However, when the hop count is 0 and the source Net ID is 0x00,the network device does not destroy the message if the message isaddressed to itself and thus receives the message.

Furthermore, if the message relates to a router data request, the routerreceives and replies to the message even if the Net ID of the source isdifferent from that of the router.

Fourth Embodiment

Description is made to two types of startup sequences for a generalrouter or a general network device other than the router, including acold start and a warm start. “A cold start” is a startup sequence thatruns an initialization process that erases all network address data froma previous startup sequence. “A warm start” is a startup sequence thatruns an initialization process while keeping previous network addressand initialization settings.

A. Startup Sequence of General Network Device

The startup sequence of a general network device is describedspecifically below.

At startup a network device begins by acquiring a network address forrecognizing and specifying itself. As noted above the network addressincludes a Net ID and a Node ID. It is assumed below that the Node IDhas already been obtained at the time the network device startsoperating, and the following two sequences are defined for acquiring theNet ID.

1) Basic sequence for a cold start

2) Basic sequence for a warm start

A cold start is a reset start of a network device in which the networkaddress is reset. A warm start is a start with a previously set Net IDretained in which the network address has already been set.

The concept of a “default router” is introduced in the above basicsequences. Network devices exchange data using a network address thatidentifies the network device without being aware of any subnets.Devices that have the same Net ID in the network address are on the samesubnet, and can send messages directly to another network device byspecifying the MAC address. However, if the Net ID of the networkaddress of one device is different from the Net ID of others, thedevices are on different subnets connected via a router, and routing isnecessary in order to exchange data. Therefore the concept of a defaultrouter is introduced to make it easier for each non-router networkdevice to process messages transmitted to network devices on othersubnets.

When setting the Net ID, each non-router network device internallystores the network address of one of plural routers connected to thesame subnet as “default router” data. Messages sent to network deviceson another subnet can then be simply sent to the default routerregardless of the subnet of the destination device. Which router isdefined as an own default router is not specifically defined.

A. 1 Startup Sequence for Cold Start of Network Device

During a cold start, a network device acquires a Node ID from a lowercommunication layer or a setting on an application software, and thenetwork device then acquires a Net ID via the subnet. The basic sequencewhereby a network device on the subnet acquires the Net ID during a coldstart is described below.

FIG. 17 shows the basic cold start sequence of a network device. This isthe basic sequence run after the Node ID is set (that is, aftercommunication within the subnet is enabled). Messages (1) to (3) in FIG.17 are set as follows.

TABLE 1 Message SNA: default value (0x00) (1) DNA: broadcast within thesubnet (0x01FF) DOJ: router profile object (0x0EF101) OPC: Net IDproperty (0xE1) OSV: read request (0x62) Message Individual responsemessage (2) SNA: value of router's network address with Net ID set to0x00 DNA: SNA in message (1) Specifying read response to message (1)(SOJ = 0x0EF101, OPC = 0xE1, OSV = 0x72, ODT = Net ID information)Message SNA: specifying self network address with assigned Net ID (3)DNA: broadcast within the domain (0x00FF) SOJ: node profile object(0x0EF001) OPC: instance change class announce property (0xD5) OSV:announcement (0x73) T2 Time-out waiting for message (2). If message (2)is not received after waiting time T2, 0x00 is set as the Net ID.

Referring to FIG. 17, when a network device is newly connected to asubnet and setting the Node ID is completed (S301), a message (1) isbroadcast throughout the subnet. The message (1) requests reading theNet ID of routers that have already started up on the subnet. If aresponse message (2) is received from a router within the specified timeT2, the network device acquires the Net ID from the response message(2), sets its own Net ID with the acquired Net ID, and sets the networkaddress of its own default router to a specified value (S302). It thenbroadcasts frame (3) throughout the domain, and accounces a statuschange.

A.2 Startup Sequence for Warm Start of Network Device

The basic sequence of a warm start is described with reference to FIG.18 and FIG. 19.

A warm start occurs when a network device with network address databeing hold is reconnected to the subnet or restarted from the statewhere the device is disconnected from the subnet or the standby state.

FIG. 18 shows a sequence to run when a Net ID read request is sent tothe default router, and a response message to the read request isreceived within the specified time T2. FIG. 19 shows a sequence to runwhen a response message to the read request is not received within thespecified time T2, that is, when there is no response.

First, the basic warm start sequence shown in FIG. 18 is described.Messages (1) to (3) in FIG. 18 are set as follows.

TABLE 2 Message SNA: self network address that has been already set (1)DNA: default router address DOJ: router profile object (0x0EF101) OPC:Net ID property (0xE1) OSV: read request (0x62) Message Individualresponse message (2) SNA: router's network address with Net ID set to0x00 DNA: SNA in message (1) specifies read response to message (1) (SOJ= 0x0EF101, OPC = 0xE1, OSV = 0x72, ODT = Net ID data) Message DNA:broadcast within the domain (0x00FF) (3) SOJ: node profile object(0x0EF001) OPC: instance change class announce property (0xD5) OSV:announcement (0x73) T2 Time-out waiting for message (2). (60 seconds:for design guideline)

Referring to FIG. 18, when a network device is reconnected to a subnetfrom a standby state in which the network address is already set (S401).Message (1) is sent to the default router to request reading the Net ID.If a response message (2) is received from the default router within thespecified time T2, the network device checks whether the Net ID in theresponse message (2) matches the Net ID stored by the device (S402). Ifthe Net IDs do not match, the cold start sequence runs. If the Net IDsmatch, a message (3) is broadcast throughout the domain and a statechange is announced.

The basic warm start sequence shown in FIG. 19 is described next.Messages (1) to (4) in FIG. 19 are set as follows.

TABLE 3 message SNA: self network address already stored (1) DNA:address of default router DOJ: router profile object (0x0EF101) OPC: NetID property (0xE1) OSV: read request (0x62) message DNA: broadcastwithin the subnet (2) other values as in message (1) message Individualresponse message (3) SNA: router's network address DNA: SNA in message(1) specifies read response to message (1) (SOJ = 0x0EF101, OPC = 0xE1,OSV = 0x72, ODT = Net ID data) message DNA: broadcast wihtin the domain(0x00FF) (4) SOJ: node profile object (0x0EF001) OPC: instance changeclass announce property (0xD5) OSV: announcement (0x73) T2 Time-outwaiting Net ID read response If message (3) is not received afterwaiting T2 (60 seconds: for design guideline), operation starts usingpreviously stored Net ID.

Referring to FIG. 19, when a network device is reconnected to a subnetfrom a standby state in which the network address is already set (S411),a message (1) is sent to the default router to request reading the NetID. A response message from the default router is then awaited and if aresponse message is not received within the specified time T2, a message(2) is broadcast over the subnet to request reading the Net ID of arouter on the subnet. If a message (3) in response to the message (2) isreceived within the specified time T2, the network device checks whetherthe Net ID in the response message (3) matches the Net ID stored by thedevice (S412). If the Net IDs do not match, the cold start sequenceruns. If the Net IDs match, or if the message (3) is not received withinthe specified time T2 after transmitting message (2), a message (4) isbroadcast throughout the domain and a status change is announced. Inthis case, the network device starts up using the stored Net ID.

B. Startup Sequence of General Router at

This embodiment of the invention describes the startup sequence for ageneral router R1 connected to a network as shown in FIG. 7. Thisgeneral router R1 is connected to subnet A and subnet B. Parent routerRp is also the master router of subnet A. General router R1 isconfigured as shown in FIG. 3.

B. 1 Startup Sequence for Cold Start of General Router

The cold start startup sequence for a general router is described firstbelow. This cold start sequence runs when a new router is connected forthe first time and when a router that was previously used is replacedwith a different router.

For a new connection of the router, if a Net ID is already allocated toeach of the two or more subnets managed by the newly connected router,the router function must not be activated in order to avoid a loopwithin the domain during message communication. For a replacement of therouter, however, a Net ID is already assigned to each of all connectedsubnets.

A general router runs a different startup sequence different from thatof other network device (general nodes) on the connected subnet. Theconditions enabling a general router to operate normally as a router aredifferent when the router is newly connected to the subnet and when therouter is replaced. These different conditions are as described below.

(1) Conditions when a New Router is Connected

1) There is only one master router on all subnets connected by the(target) router that will perform a cold start.

2) At least one subnet connected to the target router does not haveanother router and does not have an assigned Net ID.

3) Both router data for the new router (router ID and Net ID of thenewly connected subnet) and all router data can be obtained from theparent router.

(2) Conditions when a Router is Replaced

1) There is one master router on all subnets connected by the targetrouter.

2) A Net ID is assigned to each of all subnets connected by the targetrouter.

3) Both router data (router ID and Net ID of the newly connected subnet)and all router data can be obtained from the parent router.

TABLE 4 Net ID assignment Detected Communication state to master withparent connected Case routers router subnets Process 1 2 or more * *Does not start up as a router (router function is inactive) 2 0 * * Doesnot start up as a router 3 1 cannot * Does not start up as a router 4 1can Assigned to Starts up as all a replacement router 5 1 can Notassigned Starts up as a router to one (router function is active) *State not relevant to startup sequence

Various cases which may occur when a general router might do cold startare shown in the following Table 1.

FIG. 8 is a view showing the startup sequence of the cold start for ageneral router. With reference to FIG. 8, the startup sequence of thecold start is described below. Note that messages 1 to 13 in FIG. 8 aredefined as shown below.

TABLE 5 message (1) SNA: stored value of own network address DNA:broadcast within the subnet DOJ: router profile object (0x0EF101) OPC:master router data property (0xE6) OSV: read request (0x62) message (3)SNA: stored value of own network address with the Net ID of 0x00 DNA:broadcast within the subnet DOJ: node profile object (0x0EF001) OPC: NetID property (0xE1) OSV: read request (0x63) message (5) DNA: masterrouter DOJ: router profile object (0x0EF101) OPC: parent router networkaddress property (0xE3) OSV: read request (0x62) message (7) SNA:network address on subnet A DNA: parent router DOJ: router profileobject (0x0EF101) OPC: registration request router property (0xE5) OSV:write request (0x60) message (8) DOJ: router profile object (0x0EF101)OPC: self-router data property (0xE0) OSV: write request (0x61) message(10) DOJ: router profile object (0x0EF101) OPC: all router data property(0xE4) OSV: write request (0x61) message (12) SNA: network address onsubnet B with Net ID of 0x00 DNA: broadcast within the subnet (0x01FF)DOJ: node profile object (0x0EF001) OPC: Net ID property (0xE1) OSV:write request (0x60) message (13) SNA: network address of sabnet A onsubnet A side, network address of sabnet B on subnet B side DNA:broadcast within the domain DOJ: node profile object (0x0EF001) OPC:change instance class announce property (0xD5) OSV: report request(0x73) messages Response to messages (1), (3), (5), (8) (2), (4), (6),(9), and (10), respectively. (11)

Referring to FIG. 8, the target router (new startup router) R1 firstruns an internal initialization process and sets a Node ID (step S101).

When step S101 is completed, the subnet ID code requesting units 314 a,314 b broadcast a message (1) within the connected subnets A and B. Themessage (1) requests master router data from all routers connected tosubnets A and B. It is noted that a router has a master router data thatindicates whether the router is master or slave on each subnets to whichthe router connects. The master router data includes master routeridentifier (0x41 for master router, 0x42 for slave router) at the firstbyte and Net ID at the second byte. All routers connected to subnets Aand B then return messages (2) in response to the message (1) to thetarget router. The intra-subnet communication processors 319 a, 319 b ofthe target router R1 then receive response messages (2), and subnet IDcode confirmation unit 316 a, 316 b confirm the master router data inthe received response message (2) (step S102). It can be confirmed thata master router (Rp) is on subnet A by confirming the received messages(2). If it is thus confirmed that there are 0 or 2 or more routers onone subnet, a startup sequence activating the router as a common networkdevice without activating the router functionality is run. If thishappens, the rest of the sequence shown in FIG. 8 is not completed.

The subnet ID code requesting unit 314 b of the target router R1 thenrequests, the Net ID to all devices on the subnet B side where there isno master router, with a message (3). In response to the message (3),all devices connected to the subnet B then return messages (4). Based onthe Net IDs contained in the received messages (4), the subnet ID codeconfirmation unit 316 b of target router R1 is able to recognize theconfiguration of the subnet B (step S103). The target router R1 thusconfirms the assignment of Net IDs and starts up as a replacement routerif a Net ID is assigned to all subnets. However, if there is even onesubnet to which a Net ID is not assigned, the target router R1 starts upas a router newly connected to the at least one subnet.

The subnet ID code confirmation unit 316 b then sends a message (5) tothe master router (Rp) to request a read of the parent router data, Inresponse to message (5), a message (6) is returned. It should be notedthat T3 in FIG. 8 denotes the response time-out time. The parent routerRp is thus confirmed from the message (6), and the subnet ID codereporting unit 315 a of the target router R1 then sends message (7) tothe parent router Rp. This requests the parent router Rp to write(register) an address of the target router R1 into the parent router Rp.A router data write request is then sent in a message (8) from theparent router Rp to the target router R1, and all router data writerequest is sent in a message (10). The target router R1 then returnsresponse messages (9) and (11) to the messages (8) and (10). It is notedthat the message (7) does not need a response message.

When setting the router information is thus completed (step S104),subnet ID code reporting unit 315 b broadcasts a message (12) within thesubnet B to request to write the Net ID to each node in the subnet B. Amessage (13) is also sent to announce a status change to subnets A andB.

When this startup sequence ends, the target router R1 starts operationas a router (step S105).

The Net IDs, parent router data, and all router data obtained throughthe above sequence are respectively stored to the subnet ID code storageunit 313, the parent router data storage unit 312, and the all routerdata storage unit 311.

B.2 Startup Sequence for Warm Start of General Router

The warm start sequence of a general router is described next.

The warm start sequence of the general router runs when the power isrestored and routers reboot after the power to the entire domain isinterrupted due to a power outage, for example. When a general routerwarm starts depends on various factors including whether a master routeris detected on a subnet, but the major cases are shown in the followingtable. The specific operations performed in each of these cases areshown in the following four sequences A to E.

It is noted that the routing function of the router is paused during awarm start until the process ends (i.e., normal operation resumes).

TABLE 6 Detected Communication Master All router Connected master withrouter data from subnet Case routers parent router data master routerinformation Process 1 2 or more * * * * D 2 0 * * * same A 3 0 * * *different E (all nodes) 4 1 impossible same same same A 5 1 impossiblesame same different E (all nodes) 6 1 impossible same different * E 7 1impossible different * * E 8 1 possible same * same B 9 1 possiblesame * different C (all nodes) 10 1 possible different * * C * State notrelevant to startup sequence

Process A: to startup using data stored from before the warm start.

Process B, C: to request the parent router to provide router data andthen to startup using the data from the parent router.

Process D: not to start routing function in the router.

Process E: to start up as a simple node with the routing function notenabled.

The warm start sequence of a general router is described more fully withreference to FIG. 9. Messages (1) to (15) shown in FIG. 9 are set asshown in Table 4.

TABLE 7 message (1) SNA: stored value of network address of each subnetDNA: broadcast within the subnet DOJ: router profile object (0x0EF101)OPC: master router data property (0xE6) OSV: read request (0x62) message(3) SNA: stored value of network address with the Net ID value of 0x00DNA: broadcast within the subnet DOJ: node profile object (0x0EF001)OPC: Net ID property (0xE1) OSV: read request (0x62) message (5) DNA:master router DOJ: router profile object (0x0EF101) OPC: parent routernetwork address property (0xE3) OSV: read request (0x62) message (7)DNA: master router DOJ: router profile object (0x0EF101) OPC: all routerdata property (0xE4) OSV: read request (0x62) message (9) SNA: networkaddress on subnet A DOJ: router profile object (0x0EF101) OPC:registration request router property (0xE5) OSV: write request (0x60)message (10) DOJ: router profile object (0x0EF101) OPC: self-router dataproperty (0xE0) OSV: write request (0x61) message (12) DOJ: routerprofile object (0x0EF101) OPC: all router data property (0xE4) OSV:write request (0x61) message (14) SNA: network address on subnet B DNA:broadcast within the subnet (0x01FF) DOJ: node profile object (0x0EF001)OPC: Net ID property (0xE1) OSV: write request (0x60) message (15) SNA:network address on subnet B with Net ID of 0x00 DNA: broadcast wihtinthe domain DOJ: node profile object (0x0EF001) OPC: change instanceclass announce property (0xD5) OSV: report request (0x73) messages (2),Responses to messages (1), (3), (5), (7), (10), (12), (4), (6), (8),respectively. (11), (13)

Referring to FIG. 7 and FIG. 9, when the off-line state resulting from apower outage, for example, ends and the target router R1 reconnects tothe subnet, subnet ID code requesting units 314 a, 314 b of the targetrouter R1 broadcast message (1) to the subnets A and B to which therouter is connected. All routers on subnets A and B are thus requestedto return the master router data. A message (2) in response to therequest message (1) is returned to the target router. The subnet ID codeconfirmation unit 316 a, 316 b of the target router R1 then confirm themaster router data in the received response message (2) (step S202). Ifit is thus confirmed that there are 2 or more master routers on onesubnet, the routing function of the router is not enabled (that is, therest of the sequence shown in FIG. 9 does not run).

The subnet ID code requesting unit 314 b of the target router then sendsa Net ID read request with a message (3) to all nodes on the subnetwhere a master router (Rp) is not found, that is, subnet B in thisexample. A response message (4) to the message (3) is then returned fromall devices on subnet B. Based on the Net IDs contained in the receivedresponse messages (4), the subnet ID code confirmation unit 316 b of thetarget router R1 is able to confirm (comprehend) the configuration ofthe subnet (step S203). If the number of master routers is 0 and thestored subnet configuration and the confirmed subnet configurationdiffer, the routing function of the router is not enabled (i.e., therest of the sequence does not run). If the number of master routers is 0and the stored subnet configuration and the confirmed subnetconfiguration are the same, the router operates using the storedinformation (i.e., the rest of the sequence does not run).

The subnet ID code requesting unit 314 a then asks the master router Rpto send the parent router data by sending a message (5). A message (6)is then returned in response to the message (5).

The subnet ID code requesting unit 314 a then sends a read request inmessage (7) to the master router Rp. A message (8) is returned inresponse to the message (7). Based on the response message (8), thesubnet ID code requesting unit 314 a confirms the all router data (stepS204). If there is no parent router, the all router data is retrievedfrom the master router. If the retrieved data, the data stored in thetarget router and the subnet configuration detected in step S203 match,the router operates using the stored router data (the rest of theprocess does not run). If the configurations do not match, the routingfunction is not enabled (the rest of the sequence does not run).

A target router R1 address write (registration) request is then sent tothe parent router Rp in a message (9). The parent router Rp then sends amessage (10) for a router data write request and a message (12) for allrouter data write request. Response messages (11) and (13) are returnedin response to messages (10) and (12), respectively.

When setting the router data is thus completed (step S205), the subnetID code requesting unit 314 b broadcasts a message (14) over subnet B torequest to write the Net ID to each device in subnet B. Message (15) isalso sent to both subnets A and B to announce a status change. When thisstartup sequence ends, the target router R1 starts normal operation as arouter (step S206).

The Net IDs, parent router data, and all router data obtained throughthe above sequence are respectively stored to the subnet ID code storageunit 313, the parent router data storage unit 312, and the all routerdata storage unit 311, respectively.

Fifth Embodiment

In description of the third embodiment, the network device receives anddoes not destroy a message when the hop count of the received message is0 and the source Net ID is 0x00 if the destination is itself.Alternatively the router receives and responds to a message that is arequest related to the router data even if the Net ID of the source doesnot match that of the router it self. In that embodiment, the Net ID ofthe slave router part is 0x00, but it is temporary Net ID until acorrect ID is assigned by the parent router and then is set to a valueother than 0x00 after it starts up as a router. The following problemscan thus occur.

Referring to the network shown in FIG. 2, when the device 23 a is newlyconnected to the subnet C 23 or when the device 23 a is a portabledevice with a wireless networking capability that moves into range ofsubnet C, the device 23 a normally obtains a Node ID that is uniquewithin subnet C and then obtains the Net ID of subnet C. If for somereason the Net ID is unobtainable, then a temporary Net ID such as 0x00is used. The device 21 b on the subnet A (21) may likewise betemporarily using 0x00 as a Net ID. There could thus be multiple devicenodes with a temporary Net ID of 0x00 in the network domain at the sametime.

If device 23 a, for example, then transmits or broadcasts a message withthe destination network address DNA set to the Net ID of subnet

A or B other than the subnet (C), when the router 32 routes the messageto the subnet other than subnet C, the device 21 b on the subnet A orthe router 31 will receive a message that it should not normally processand may run an unnecessary process.

Especially, if the received message requires a response, when the router31 sends a response message, the device 21 b on the subnet A that shouldnot receive the response will receive since the destination networkaddress DNA in the response is set to 0x00 as described above. Thiscauses the device 21 b to do unnecessary processing.

The router 31 or device 21 a on the subnet A that received a certainmessage from the source node device 23 a may also determine that themessage was from the device 21 b on the same subnet A. In this casethere is a strong possibility of a system error occurring. This canoccur particularly when the router or device does not have a functionfor monitoring the hop count and determining the appropriate processbased on the hop count, or if this function is disabled.

The following three methods can be used to avoid the above problems.

(1) In the first way, when receiving a message (including broadcasts andbroadcasts within the domain) with DNA set to a different subnet and theNet ID of SNA set to 0x00, the router does not route the message outsideof the same subnet;

(2) In the second way, the receiving node, receiving device, orreceiving router monitors the hop count of a message with the SNA set to0x00, and destroys the message of which hop count is not 0, i.e., amessage that came from a different subnet; and

(3) In the third way, any device having a Net ID of 0x00 does not issuea message to be transmitted to a different subnet.

-   -   Methods (1) and (3) are effective when a device without a hop        count monitoring function is connected to the subnet.    -   Method (1) above can be achieved by implementing the following        procedures. It is determined if SNA of the received message is        0x00, and if DNA is a Net ID other than the Net ID of the        router. Further it is determined if the SNA of the received        message is 0x00, and if the broadcast identifier denotes a        broadcast within the domain. If either determination result is        “YES”, since it means that the received message meets the above        conditions, the routing of the received message is not done        according to the result of the determination. It is noted that        to stop routing the message is the same as the router destroying        the message.

Method (2) can be achieved by implementing the following procedures.First it is determined if the SNA of the received message is 0x00, ifthe broadcast identifier denotes a broadcast within the domain, and ifthe hop count is 1 or higher. If either determination result is “YES”,it means that the received message meets the above conditions.Therefore, the message is destroyed.

Method (3) can be achieved by implementing the following procedures.When the Net ID of the device is 0x00, the device issues a message torequest the Net ID to reset, as already described, receives the Net IDfrom routers or other devices on the same subnet, and for apredetermined time does not issue a message in which DNA is set to adifferent Net ID as well as not broadcast a message. (If a message isbroadcast, it must be handled using methods (1) and (2).)

Sixth Embodiment

The preceding embodiments use as a property of messages relating to therouter an object property code OPC indicating the content type of themessage (see FIG. 6B). An exemplary method for determining this objectproperty code OPC is described below. Each property is described below,including property name, property code, property content and method ofdenoting a value, a data type, a data size, an access rule, informationwhether a property is essential, an announcement when a propertychanges, and so on. It should be noted that values of codes are shownbelow bay way of example.

[Operating Status Property]

When OPC=0x80, the operating status property indicates “a operatingstatus of Net ID server function” or “a operating status of routerfunction”. 0x30 indicates active, 0x31 indicates inactive. The data typeis UC (unsigned Character), the size is 1 byte, the access rule isSet/Get. Here, “Set” denotes to write the property value, while “Get”denotes to read the property value. This property must be announced orreported when the status changes.

This profile class exists when a node has a Net ID server function orrouter function. This property indicates whether the Net ID serverfunction or router function is active (i.e., whether the node isfunctioning as a router).

[Abnormal Content Property]

This property indicates “abnormal content” when OPC is 0x89. It takes avalue of 0x0000 to 0x000F (0 to 15), the data type is US, the size is 2bytes, the access rule is “Get.”. This property is not essential, and anannouncement at the state change is not essential. The value of thisproperty has a meaning as follows.

0x0000 means “not abnormal”. 0x0001 means “no parent router” (that is,no Net ID is assigned to any connected subnet, and there is no parentrouter). 0x0002 means “retrieving data from the parent router failed”(that is, a Net ID server function was detected in the domain, butrouter data and all router data could not be retrieved from the Net IDserver function). 0x0003 means “subnet communication error”(communication is impossible on one of the two or more subnets connectedto the self. 0x0004 to 0x000F mean “available to users”. 0x0010 to0xFFFF mean “reserved for future use”.

[Self-Router Data Property]

When OPC is 0xE0, the property denotes “a self router data”. The firstbyte indicates “router attribute”, the second byte indicates “self routeID” (default=0x00), the third byte indicates “number of connectedsubnets”, the fourth byte and the later indicate EA data (networkaddresses of the subnet (ex. Echonet), each two bytes, for the number ofconnected subnets). The data type is UC, the size is maximum 17 bytes,the access rule is Set/Get. In this property, the first byte indicates“router attribute”, the attribute indicated by this code are determinedby the presence of a Net ID server function, router function, andautomatic router data setting function.

The router can also automatically acquire the data required to functionas a router by means of the startup sequence described above, but inoffice buildings and other non-residential installations the startupsequence described above may not be followed when unique subnetworkaddresses are assured throughout the domain. The presence of anautomatic router information setting function indicates the presence ofa function enabling the above startup sequence, and the absence of thisfunction indicates a router that does not follow the above startupsequence.

The bit sequence in the first byte means as follows. A bit b0 indicatesa presence of a Net ID server function (1=yes; 0=no), A bit b1 indicatesa presence of a router function (1=yes; 0=no), A bit b2 indicates apresence of an automatic router information setting function (1=yes;0=no), Bits b3, b4, b5, b6 and b7 are 00010. The bit b0=b1=1 neveroccurs. When the bit b0 is 0 and the bit b1 is 1, it denotes a generalrouter, while when the bit b0 is 1, it denotes a parent router.

The self router ID indicated in the second byte is a unique value foreach router in the domain, and is uniquely determined by the parentrouter on automatically setting.

The number of connected networks indicated in the third byte is amaximum of 7. Regarding a router connected with eight or more subnets,it is possible to handle it by changing router attributes in a future.The fourth byte and the later store network address data for the numberof connected subnets.

[Net ID Property]

When OPC is 0xE1, this property indicates one byte of Net ID. Thedefault is 0x00. The data type is UC, the size is 1 byte, and the accessrule is Set/Get. This property is essential. An announcement when thestatus changes is not essential.

This property stores the Net ID acquired from the master router orparent router in the router startup sequence. Since the router connectsplural subnets, there is a unique router profile object for each subnet.The knowable value of this property is different for each subnet.

[Router ID Property]

When OPC is 0xE2, this property indicates one byte of router ID. Thedefault is 0x00. The data type is UC, the size is one byte, and theaccess rule is Set/Get. The router ID is assigned by the parent routeras an identifier uniquely identifying the router. All router IDs aremanaged by the parent router.

[Parent Router Data Property]

When OPC is 0xE3, this property indicates the network address of theparent router (referred to as EA below). The default is 0x0000 (noparent router data). The data type is UC, the size is 2 bytes, and theaccess rule is Set/Get. This property is essential. An announcement whenthe status changes is not essential.

[All Router Data Property]

When OPC is 0xE4, this property indicates all router data in the domain.The data type is UC, the size is maximum 246 bytes, and the access ruleis Set/Get. This property is essential. An announcement when the statuschanges is not essential.

[Router Registration Request Data Property]

When OPC is 0xE5, this property indicates router registration requestdata. The first byte indicates “router attribute”. The second byteindicates “self router ID (default=0x00)”. The third byte indicates thenumber of connected subnets. The fourth byte and the later contain EAdata (network address of the subnet (ex. Echonet), each two bytes, forthe number of connected subnets). The data type is UC. The size ismaximum 17 bytes. The access rule is only Set. This property isessential. An announcement when the status changes is not essential.

This property is essential to any node having a Net ID server function.By writing the network address of every node in the general router (allEA data) to this property in the router startup sequence, a generalrouter announces its own network address (EA) data to the node with theNet ID server function. During the router startup sequence, a node witha Net ID server function executes a write request to the self-routerdata property and all router data property of the router profile for ageneral router, based on the content requested in this property by ageneral router.

[Master Router Data Property]

When OPC is 0xE6, this property indicates master router data. The firstbyte indicates master router identifier (master router is 0x41, slaverouter is 0x42). The second byte indicates Net ID data. The data type isUC. The size is 2 bytes. The access rule is Get. This property is usedin the startup sequence of a general router. Because the router isconnected to plural subnets, there is a unique router profile object foreach subnet. The knowable value of this property is different for eachsubnet. If announcement at the status change is essential, it is alwaysprocessed when the property is implemented. If there are multiple nodeswithin a single router, the above profile class is defined for eachnode, but common values specific to the router are stored for allproperties other than Net ID of 0xE1.

The properties in the above-described router profile class are providedwith class group code of 0x0E, class code of 0xF1, and instance code of0x01.

The router profile class process specifications are described in detailnext.

It should be noted that OPC and ODT used above are denoted as EPC andEDT, respectively, below.

Regarding router profile class, a communication device having multiplenodes but not a router function do not have a router profile class. Ageneral node requires this stipulation.

If a node has an Net ID server function or a router function, this classmust be implemented. This stipulation is also essential in generalrouters and parent routers.

If a single device has multiple nodes, this property is provided in therouter profile class for each node in the device functioning as arouter, common values are stored for properties other than Net ID(EPC=0xE1) and master router data (EPC=0xE6). This stipulation is alsoessential in general routers and parent routers.

Essential properties defined in the router profile class shall beprovided. This stipulation is also required in general routers andparent routers.

The access rule shall be set to Get (property that can be referencedfrom other nodes, i.e., ESV=0x62 or 0x63) for each of the followingproperties: operating status (EPC=0x80), self router data (EPC=0xE0),Net ID (EPC=0xE1), router ID (EPC=0xE2), parent router data (EPC=0xE3),all router data (EPC=0xE4), master router data (EPC=0xE6). Thisstipulation is also required in general routers and parent routers.

[Operating Status Property]

The operating status property (EPC=0x80) means an announcement for astatus change by broadcasting a notice to the domain when a statechanges. This stipulation is required in general routers and parentrouters. This property indicates if the Net ID server function or routerfunction is active, in which 0x30 means active, and 0x31 means inactive.This stipulation is essential in general routers and parent routers.

[Abnormal Content Property]

In this property, a value in the range 0x0004 to 0x000F and the range0x0010 to 0xFFFF is not set as a property value (EDT) of abnormalcontent (EPC=0x89). This stipulation is essential in routers and parentrouters. In this property, 0x0000 is set when the content is notabnormal, 0x0001 is set when a parent router could not be detected,0x0002 is set when retrieving data from the parent router failed, and0x0003 is set when communication can not be established on one of thesubnets connected to the router.

[Self Router Data Property]

In this property, the first byte indicates a router attribute, thesecond byte indicates the self router ID, the third byte indicates thenumber of connected subnets, the fourth byte and the later contain allEA stored in itself (EAs for the number of connected subnets).

If a Net ID server function is provided, a bit b0 of the first byte isset to 1, whenever the Net ID server function is operating. If a Net IDserver function is not provided, a bit b0 of the first byte is set to 0.

In this property, when the Net ID server and the router which have arouter function, a bit b1 of the first byte is set to 1.

If there is no startup sequence function, a bit b2 of the first byte inthis property is set to 0. If there is a startup sequence function, thebit b2 of the first byte is set to 1.

This property stipulates that a general router shall not function as arouter unless a value other than 0x00 is set by the parent router to theself router ID in the second byte.

The number of connected subnets in the third byte shall be a value of 7or less in this property.

[Net ID Property]

For this property, a value other than 0x00 is set in the Net ID serverwhen the Net ID server function starts.

For this property, the value acquired from a Net ID server or the masterrouter is set in a general router.

The value knowable to each subnet by this property is different (a valuespecific to the subnet is returned in response to a read request).

For this property, the slave side of a general router will not accept aSet from a router other than the master router.

This property requires that if a request to write to this property avalue different from the Net ID already stored is received during normaloperation from the master router, the device stops and then either warmstarts or cold starts.

This property requires that requests to write to this property duringnormal operation a value different from the Net ID already stored willnot be received.

With this property, while the router function or Net ID server functionis inactive, a Set or a Get will not be accepted (i.e., is not visiblefrom the outside) and this property is removed from a property map.

[Router ID Property]

In this property, a general router sets the value of the second byte inthe self router data written by the parent router during the startupsequence, and does not accept external write requests.

A Net ID server (parent router), when starting up as a Net ID server,sets this property by itself. External write requests to this propertyis not accepted.

[Router Registration Request Data Property]

This property is used only in the Net ID server. (It is not used withgeneral routers, and is not available if a router starts up as a generalrouter even if it has a Net ID server function.)

When there is a write request to this property, the Net ID server runsthe startup process for the router from which the registration requestwas received (if it can start up as a router; a write request to theself router data property and all router data property in the routerprofile for the general router is executed).

[Parent Router Data Property]

The slave side of a general router sets this property by acquiring thevalue from the master router. With this property write requests fromothers will not be accepted.

For this property, the general router (slave side) and Net ID serverholds the default value 0x0000 until the general router (slave side) andNet ID server both start up as a general router and Net ID server,respectively. The parent router (Net ID server) sets the value of itsown network address (EA) to this property. With this property, writerequests from others will not be accepted.

[All Router Data Property]

This property is set in a general router (slave side) by a write requestfrom a master router or a parent router. Write requests from other thanthe master router or the parent router are not accepted.

When the Net ID server detects a domain configuration change (a newgeneral router is added or reset, for example), it writes the newinformation relating to the all router data property of all generalrouters in the domain.

[Master Router Data Property]

This property indicates if a router enabling a router function on asubnet which opens a router profile class is a master router. Thisproperty is set to 0x41 when the router is a master router, and is setto 0x42 when it is a slave router.

With this property, master router data can be set internally by therouter based on the self router data set by the parent router (in thecase of the parent router, set internally by itself), and is read-onlyto other devices. As will be app system, and thereby enables the systemor the router to restart in a short time.

Furthermore, when the entire network system is reset or only a specificrouter is reset or replaced, the state in use before the router wasreplaced can be automatically restored, and system management isfacilitated without needing to reset the information known to thecontroller or other device used to manage the networked devices.

Although the present invention has been described in connection with thepreferred embodiments thereof with reference to the accompanyingdrawings, it is to be noted that various changes and modifications willbe apparent to those skilled in the art. Such changes and modificationsare to be understood as included within the scope of the presentinvention as defined by the appended claims, unless they departtherefrom.

The present disclosure relates to subject matter contained in JapanesePatent Applications No. 2002-006497 filed on Jan. 15, 2002, No.2002-028342 filed on Feb. 5, 2002, No. 2002-044765 filed on Feb. 21,2002, and No. 2002-270846 filed on Sep. 18, 2002, which are expresslyincorporated herein by reference in its entirety.

1. A method of starting a first routing device connecting a plurality ofnetworks to which a plurality of routing devices are connected, whereineach routing device stores master router data for each network to whichthe routing device is connected and network identification data, whereinthe master router data stored by each routing device indicates whetherthe respective routing device is a master router or a slave router withrespect to each network to which the respective routing device isconnected, wherein, with respect to each network, one of the routingdevices connected thereto that is also connected to a network nearer toa parent router, which assigns the network identification data toidentify the networks, is the master router, wherein, with respect toeach network, one or more of the routing devices connected thereto thatis not connected to the network nearer to the parent router, is theslave router, and wherein the network identification data of eachrespective routing device identifies a network to which the respectiverouting device is connected, the method of starting the first routingdevice comprising: requesting, by the first routing device, the masterrouter data from each routing device connected to the networks to whichthe first routing device is connected; acquiring the master router datain response to the requesting of the master router data; determining,from the acquired master router data, a number of detected masterrouters connected to the networks to which the first routing device isconnected; and disabling a router function of the first routing devicewhen, in relation to the networks to which the first routing device isconnected, the determined number of detected master routers is zero ortwo or more, such that a loop path is prevented from forming between thefirst routing device and the plurality of routing devices, wherein therouting function of the first routing device allows the first routingdevice to connect to a network, such that when the router function isdisabled, the first routing device cannot connect to the network.
 2. Themethod according to claim 1, wherein, when receiving data relating to arequest for an attribute of a routing device, a routing device returns aresponse, even if a hop count is zero and the network identificationdata of the source of the received data is different from the networkidentification stored in the routing device which received the requestfor the attribute.
 3. The method according to claim 1, wherein, when acommunication device connected to the networks stores networkidentification data to identify a network to which the communicationdevice connects, the method further comprises transmitting requests forreading out network identification data to communication devicesconnected to any of the networks to which the first routing device isconnected, and disabling the router function of the first routing devicewhen a configuration of the networks to which the first routing deviceis connected is different from a configuration of networks stored by thefirst routing device.
 4. The method according to claim 1, furthercomprising transmitting a request for reading out information relatingto the parent router to a routing device which stores master router dataindicating a master router.
 5. The method according to claim 1, whereinonly the master router requests writing of the network identificationdata to communication devices other than the routing devices, the masterrouter accepts a request for writing the network identification dataonly from the parent router, and the parent router does not accept therequest for writing the network identification data.
 6. A first routingdevice connecting a plurality of networks to which a plurality ofrouting devices are connected, wherein each routing device stores masterrouter data for each network to which the routing device is connectedand network identification data, wherein the master router data storedby each routing device indicates whether the respective routing deviceis a master router or a slave router with respect to each network towhich the respective routing device is connected, wherein with respectto each network one of the routing devices connected thereto that isalso connected to a network to a parent router, which assigns thenetwork identification data to identify the networks, is the masterrouter, wherein, with respect to each network, one or more of therouting devices connected thereto that is not connected to the networknearer to the parent router, is the slave router, and wherein thenetwork identification data of each respective routing device identifiesa network to which the respective routing device is connected, the firstrouting device comprising: a requesting section for requesting themaster router data from each routing device connected to the networks towhich the first routing device is connected; a receiving section forreceiving the master router data in response to the requesting of themaster router data by the requesting section; a determining section fordetermining, from the received master router data, a number of detectedmaster routers connected to the networks to which the first routingdevice is connected; and a disabling section for disabling a routerfunction of the first routing device when, in relation to the networksto which the first routing device is connected, the determined number ofdetected master routers is zero or two or more, such that a loop path isprevented from forming between the first routing device and theplurality of routing devices, wherein the routing function of the firstrouting device allows the first routing device to connect to a network,such that when the router function is disabled, the first routing devicecannot connect to the network.
 7. The method according to claim 2,further comprising transmitting a request for reading out informationrelating to the parent router to a routing device which stores masterrouter data indicating a master router.
 8. The method according to claim3, further comprising transmitting a request for reading out informationrelating to the parent router to a routing device which stores masterrouter data indicating a master router.
 9. The method according to claim2, wherein only the master router requests writing of the networkidentification data to communication devices other than the routingdevices, the master router accepts a request for writing the networkidentification data only from the parent router, and the parent routerdoes not accept the request for writing the network identification data.10. The method according to claim 3, wherein only the master routerrequests writing of the network identification data to communicationdevices other than the routing devices, the master router accepts arequest for writing the network identification data only from the parentrouter, and the parent router does not accept the request for writingthe network identification data.
 11. The method according to claim 4,wherein only the master router requests writing of the networkidentification data to communication devices other than the routingdevices, the master router accepts a request for writing the networkidentification data only from the parent router, and the parent routerdoes not accept the request for writing the network identification data.12. A computer-readable recording medium having a program recordedthereon, the program causing a computer to execute the method ofclaim
 1. 13. A computer-readable recording medium having a programrecorded thereon, the program causing a computer to execute the methodof claim
 2. 14. A computer-readable recording medium having a programrecorded thereon, the program causing a computer to execute the methodof claim
 3. 15. A computer-readable recording medium having a programrecorded thereon, the program causing a computer to execute the methodof claim
 4. 16. A computer-readable recording medium having a programrecorded thereon, the program causing a computer to execute the methodof claim
 5. 17. The method according to claim 1, wherein the method isperformed when the first routing device is newly connected to thenetwork and when the first routing device replaces a previous router.